|
@ -565,7 +565,16 @@ Node.prototype._drawImage = function (ctx) { |
|
|
yLabel = this.y; |
|
|
yLabel = this.y; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.boundingBox.top = this.top; |
|
|
|
|
|
this.boundingBox.left = this.left; |
|
|
|
|
|
this.boundingBox.right = this.left + this.width; |
|
|
|
|
|
this.boundingBox.bottom = this.top + this.height; |
|
|
|
|
|
|
|
|
this._label(ctx, this.label, this.x, yLabel, undefined, "top"); |
|
|
this._label(ctx, this.label, this.x, yLabel, undefined, "top"); |
|
|
|
|
|
this.boundingBox.left = Math.min(this.boundingBox.left, this.labelDimensions.left); |
|
|
|
|
|
this.boundingBox.right = Math.max(this.boundingBox.right, this.labelDimensions.left + this.labelDimensions.width); |
|
|
|
|
|
this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelDimensions.height); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -871,9 +880,9 @@ Node.prototype._drawShape = function (ctx, shape) { |
|
|
|
|
|
|
|
|
if (this.label) { |
|
|
if (this.label) { |
|
|
this._label(ctx, this.label, this.x, this.y + this.height / 2, undefined, 'top',true); |
|
|
this._label(ctx, this.label, this.x, this.y + this.height / 2, undefined, 'top',true); |
|
|
this.boundingBox.left = Math.min(this.boundingBox.left, this.labelDimensions.left) |
|
|
|
|
|
this.boundingBox.right = Math.max(this.boundingBox.right, this.labelDimensions.left + this.labelDimensions.width) |
|
|
|
|
|
this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelDimensions.height) |
|
|
|
|
|
|
|
|
this.boundingBox.left = Math.min(this.boundingBox.left, this.labelDimensions.left); |
|
|
|
|
|
this.boundingBox.right = Math.max(this.boundingBox.right, this.labelDimensions.left + this.labelDimensions.width); |
|
|
|
|
|
this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelDimensions.height); |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|