Bläddra i källkod

decrease whitespace in ellipses having long text

codeClimate
Chas Honton 9 år sedan
committad av Alexander Wunschik
förälder
incheckning
dd3639f2ad
1 ändrade filer med 2 tillägg och 5 borttagningar
  1. +2
    -5
      lib/network/modules/components/nodes/shapes/Ellipse.js

+ 2
- 5
lib/network/modules/components/nodes/shapes/Ellipse.js Visa fil

@ -11,11 +11,8 @@ class Ellipse extends NodeBase {
if (this.width === undefined) { if (this.width === undefined) {
var textSize = this.labelModule.getTextSize(ctx, selected); var textSize = this.labelModule.getTextSize(ctx, selected);
this.width = textSize.width * 1.5;
this.height = textSize.height * 2; 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; this.radius = 0.5*this.width;
} }
} }
@ -82,4 +79,4 @@ class Ellipse extends NodeBase {
} }
} }
export default Ellipse;
export default Ellipse;

Laddar…
Avbryt
Spara