diff --git a/src/graph/Node.js b/src/graph/Node.js index 36fb87bb..edb10a6c 100644 --- a/src/graph/Node.js +++ b/src/graph/Node.js @@ -397,8 +397,13 @@ Node.prototype.getDistance = function(x, y) { */ Node.prototype.setValueRange = function(min, max) { if (!this.radiusFixed && this.value !== undefined) { + if (max == min) { + this.radius = (this.radiusMin + this.radiusMax) / 2; + } + else { var scale = (this.radiusMax - this.radiusMin) / (max - min); this.radius = (this.value - min) * scale + this.radiusMin; + } } };