From dd3639f2adf5cd86d00e8ad5d9eae2f4de0f5f16 Mon Sep 17 00:00:00 2001 From: Chas Honton Date: Wed, 10 Aug 2016 19:40:53 -0700 Subject: [PATCH] decrease whitespace in ellipses having long text --- lib/network/modules/components/nodes/shapes/Ellipse.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/network/modules/components/nodes/shapes/Ellipse.js b/lib/network/modules/components/nodes/shapes/Ellipse.js index b4d0a28a..69a2d6db 100644 --- a/lib/network/modules/components/nodes/shapes/Ellipse.js +++ b/lib/network/modules/components/nodes/shapes/Ellipse.js @@ -11,11 +11,8 @@ class Ellipse extends NodeBase { if (this.width === undefined) { var textSize = this.labelModule.getTextSize(ctx, selected); - this.width = textSize.width * 1.5; this.height = textSize.height * 2; - if (this.width < this.height) { - this.width = this.height; - } + this.width = textSize.width + this.height; this.radius = 0.5*this.width; } } @@ -82,4 +79,4 @@ class Ellipse extends NodeBase { } } -export default Ellipse; \ No newline at end of file +export default Ellipse;