From 0921007d922ecf5dd3d06b719fd109302df4d0a6 Mon Sep 17 00:00:00 2001 From: Justin Greywolf Date: Mon, 27 Jan 2020 10:27:05 -0800 Subject: [PATCH] 1058-Set diagram dimensions appropriately Make sure height and width are set so that all of the diagram is displayed --- src/diagrams/class/classRenderer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/diagrams/class/classRenderer.js b/src/diagrams/class/classRenderer.js index 5e6208ac5..4e7128819 100644 --- a/src/diagrams/class/classRenderer.js +++ b/src/diagrams/class/classRenderer.js @@ -570,8 +570,8 @@ export const draw = function(text, id) { } }); - diagram.attr('height', '100%'); - diagram.attr('width', `${g.graph().width * 1.5 + 20}`); + diagram.attr('height', g.graph().height + 40); + diagram.attr('width', g.graph().width * 1.5 + 20); diagram.attr('viewBox', '-10 -10 ' + (g.graph().width + 20) + ' ' + (g.graph().height + 20)); };