Browse Source

Added icon-text-spacing

v3_develop
Rene Heindl 9 years ago
parent
commit
dfef167e08
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      lib/network/Node.js

+ 3
- 2
lib/network/Node.js View File

@ -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);

Loading…
Cancel
Save