diff --git a/lib/network/Node.js b/lib/network/Node.js index 0c35d9a2..2d4c3aed 100644 --- a/lib/network/Node.js +++ b/lib/network/Node.js @@ -1018,7 +1018,7 @@ Node.prototype._resizeIcon = function (ctx) { var iconSize = { width: Number(this.options.iconSize), - height: Number(this.options.iconSize) + 4 + height: Number(this.options.iconSize) }; this.width = iconSize.width + 2 * margin; this.height = iconSize.height + 2 * margin; @@ -1048,7 +1048,8 @@ Node.prototype._drawIcon = function (ctx) { this.boundingBox.bottom = this.y + this.options.iconSize/2; if (this.label) { - this._label(ctx, this.label, this.x, this.y + this.height / 2, 'top', true); + var iconTextSpacing = 5; + this._label(ctx, this.label, this.x, this.y + this.height / 2 + iconTextSpacing, '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);