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