1058-Set diagram dimensions appropriately

Make sure height and width are set so that all of the diagram is displayed
This commit is contained in:
Justin Greywolf
2020-01-27 10:27:05 -08:00
parent 8ebc587fb5
commit 0921007d92

View File

@@ -570,8 +570,8 @@ export const draw = function(text, id) {
} }
}); });
diagram.attr('height', '100%'); diagram.attr('height', g.graph().height + 40);
diagram.attr('width', `${g.graph().width * 1.5 + 20}`); diagram.attr('width', g.graph().width * 1.5 + 20);
diagram.attr('viewBox', '-10 -10 ' + (g.graph().width + 20) + ' ' + (g.graph().height + 20)); diagram.attr('viewBox', '-10 -10 ' + (g.graph().width + 20) + ' ' + (g.graph().height + 20));
}; };