Browse Source

Changed resizing for icons

v3_develop
Rene Heindl 9 years ago
parent
commit
830fe47776
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      lib/network/Node.js

+ 5
- 5
lib/network/Node.js View File

@ -1015,19 +1015,19 @@ Node.prototype._drawText = function (ctx) {
Node.prototype._resizeIcon = function (ctx) {
if (!this.width) {
var margin = 5;
var textSize =
var iconSize =
{
width: 1,
width: Number(this.options.iconSize),
height: Number(this.options.iconSize) + 4
};
this.width = textSize.width + 2 * margin;
this.height = textSize.height + 2 * margin;
this.width = iconSize.width + 2 * margin;
this.height = iconSize.height + 2 * margin;
// scaling used for clustering
this.width += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeWidthFactor;
this.height += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeHeightFactor;
this.options.radius += Math.min(this.clusterSize - 1, this.maxNodeSizeIncrements) * this.clusterSizeRadiusFactor;
this.growthIndicator = this.width - (textSize.width + 2 * margin);
this.growthIndicator = this.width - (iconSize.width + 2 * margin);
}
};

Loading…
Cancel
Save