mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-08 18:16:44 +02:00
Fix for issue #70
This commit is contained in:
@@ -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);
|
||||
};
|
Reference in New Issue
Block a user