|
|
@ -54,7 +54,6 @@ function Node(properties, imagelist, grouplist, networkConstants) { |
|
|
|
this.preassignedLevel = false; |
|
|
|
this.hierarchyEnumerated = false; |
|
|
|
this.labelDimensions = {top:0,left:0,width:0,height:0,yLine:0}; // could be cached
|
|
|
|
this.dirtyLabel = true; |
|
|
|
|
|
|
|
|
|
|
|
this.imagelist = imagelist; |
|
|
@ -146,10 +145,9 @@ Node.prototype.setProperties = function(properties, constants) { |
|
|
|
]; |
|
|
|
util.selectiveDeepExtend(fields, this.options, properties); |
|
|
|
|
|
|
|
this.originalLabel = undefined; |
|
|
|
// basic properties
|
|
|
|
if (properties.id !== undefined) {this.id = properties.id;} |
|
|
|
if (properties.label !== undefined) {this.label = properties.label; this.originalLabel = properties.label; this.dirtyLabel = true;} |
|
|
|
if (properties.label !== undefined) {this.label = properties.label; this.originalLabel = properties.label;} |
|
|
|
if (properties.title !== undefined) {this.title = properties.title;} |
|
|
|
if (properties.x !== undefined) {this.x = properties.x;} |
|
|
|
if (properties.y !== undefined) {this.y = properties.y;} |
|
|
@ -731,7 +729,7 @@ Node.prototype._resizeEllipse = function (ctx) { |
|
|
|
} |
|
|
|
var defaultSize = this.width; |
|
|
|
|
|
|
|
// scaling used for clustering
|
|
|
|
// 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; |
|
|
|