improved node width
This commit is contained in:
parent
b4967ca9b0
commit
569f9b62a8
2 changed files with 2 additions and 2 deletions
|
@ -376,7 +376,7 @@ var DiagramNode = /** @class */ (function (_super) {
|
|||
var typeSize = ctx.measureText(this.type);
|
||||
this.typeWidth = typeSize.width;
|
||||
this.typeHeight = typeSize.actualBoundingBoxAscent + typeSize.actualBoundingBoxDescent;
|
||||
this.width = Math.max(150, this.labelWidth, this.typeWidth);
|
||||
this.width = Math.max(130, this.labelWidth * 1.5, this.typeWidth * 1.2);
|
||||
};
|
||||
DiagramNode.prototype.pointInObject = function (p) {
|
||||
return this.pointNearNode(p) && (_super.prototype.pointInObject.call(this, p) || this.input.pointInObject(p) || this.output.pointInObject(p));
|
||||
|
|
|
@ -451,7 +451,7 @@ class DiagramNode extends CanvasObject {
|
|||
this.typeWidth = typeSize.width;
|
||||
this.typeHeight = typeSize.actualBoundingBoxAscent + typeSize.actualBoundingBoxDescent;
|
||||
|
||||
this.width = Math.max(150, this.labelWidth, this.typeWidth);
|
||||
this.width = Math.max(130, this.labelWidth * 1.5, this.typeWidth * 1.2);
|
||||
}
|
||||
|
||||
pointInObject(p: Point): boolean {
|
||||
|
|
Loading…
Add table
Reference in a new issue