Skip to content

Commit

Permalink
Fix for issue #70
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv committed Dec 23, 2014
1 parent 83d9a32 commit 385e823
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
2 changes: 2 additions & 0 deletions dist/mermaid.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -13358,10 +13358,12 @@ exports.draw = function (text, id,isDot) {

// Run the renderer. This is what draws the final graph.
render(d3.select("#" + id + " g"), g);
var svgb = document.querySelector('#mermaidChart0');

// Center the graph
svg.attr("height", g.graph().height );
svg.attr("width", g.graph().width );
svg.attr("viewBox", svgb.getBBox().x + ' 0 '+ g.graph().width+' '+ g.graph().height);
};
},{"./graphDb":104,"./parser/dot":105,"./parser/flow":106,"dagre-d3":1}],104:[function(require,module,exports){
/**
Expand Down
14 changes: 7 additions & 7 deletions dist/mermaid.full.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/mermaid.slim.js
Original file line number Diff line number Diff line change
Expand Up @@ -13326,10 +13326,12 @@ exports.draw = function (text, id,isDot) {

// Run the renderer. This is what draws the final graph.
render(d3.select("#" + id + " g"), g);
var svgb = document.querySelector('#mermaidChart0');

// Center the graph
svg.attr("height", g.graph().height );
svg.attr("width", g.graph().width );
svg.attr("viewBox", svgb.getBBox().x + ' 0 '+ g.graph().width+' '+ g.graph().height);
};
},{"./graphDb":104,"./parser/dot":105,"./parser/flow":106,"dagre-d3":1}],104:[function(require,module,exports){
/**
Expand Down
14 changes: 7 additions & 7 deletions dist/mermaid.slim.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/diagrams/flowchart/flowRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,10 @@ exports.draw = function (text, id,isDot) {

// Run the renderer. This is what draws the final graph.
render(d3.select("#" + id + " g"), g);
var svgb = document.querySelector('#mermaidChart0');

// Center the graph
svg.attr("height", g.graph().height );
svg.attr("width", g.graph().width );
svg.attr("viewBox", svgb.getBBox().x + ' 0 '+ g.graph().width+' '+ g.graph().height);
};

0 comments on commit 385e823

Please sign in to comment.