|
@ -171,6 +171,7 @@ Node.prototype.setProperties = function(properties, constants) { |
|
|
this.options[prop] = groupObj[prop]; |
|
|
this.options[prop] = groupObj[prop]; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
console.log(this.options) |
|
|
} |
|
|
} |
|
|
else if (properties.color === undefined) { |
|
|
else if (properties.color === undefined) { |
|
|
this.options.color = constants.nodes.color; |
|
|
this.options.color = constants.nodes.color; |
|
@ -620,7 +621,7 @@ Node.prototype._drawBox = function (ctx) { |
|
|
ctx.lineWidth *= this.networkScaleInv; |
|
|
ctx.lineWidth *= this.networkScaleInv; |
|
|
ctx.lineWidth = Math.min(this.width,ctx.lineWidth); |
|
|
ctx.lineWidth = Math.min(this.width,ctx.lineWidth); |
|
|
|
|
|
|
|
|
ctx.fillStyle = this.selected ? this.options.color.highlight.background : this.options.color.background; |
|
|
|
|
|
|
|
|
ctx.fillStyle = this.selected ? this.options.color.highlight.background : this.hover ? this.options.color.hover.background : this.options.color.background; |
|
|
|
|
|
|
|
|
ctx.roundRect(this.left, this.top, this.width, this.height, this.options.radius); |
|
|
ctx.roundRect(this.left, this.top, this.width, this.height, this.options.radius); |
|
|
ctx.fill(); |
|
|
ctx.fill(); |
|
|