|
|
@ -244,7 +244,7 @@ Edge.prototype._getColor = function() { |
|
|
|
if (this.selected == true) {return colorObj.highlight;} |
|
|
|
else if (this.hover == true) {return colorObj.hover;} |
|
|
|
else {return colorObj.color;} |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
@ -481,7 +481,7 @@ Edge.prototype._getViaCoordinates = function () { |
|
|
|
|
|
|
|
|
|
|
|
return {x:xVia, y:yVia}; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
* Draw a line between two nodes |
|
|
@ -601,10 +601,7 @@ Edge.prototype._label = function (ctx, text, x, y) { |
|
|
|
*/ |
|
|
|
Edge.prototype._drawDashLine = function(ctx) { |
|
|
|
// set style
|
|
|
|
if (this.selected == true) {ctx.strokeStyle = this.options.color.highlight;} |
|
|
|
else if (this.hover == true) {ctx.strokeStyle = this.options.color.hover;} |
|
|
|
else {ctx.strokeStyle = this.options.color.color;} |
|
|
|
|
|
|
|
ctx.strokeStyle = this._getColor(); |
|
|
|
ctx.lineWidth = this._getLineWidth(); |
|
|
|
|
|
|
|
var via = null; |
|
|
@ -719,9 +716,7 @@ Edge.prototype._pointOnCircle = function (x, y, radius, percentage) { |
|
|
|
Edge.prototype._drawArrowCenter = function(ctx) { |
|
|
|
var point; |
|
|
|
// set style
|
|
|
|
if (this.selected == true) {ctx.strokeStyle = this.options.color.highlight; ctx.fillStyle = this.options.color.highlight;} |
|
|
|
else if (this.hover == true) {ctx.strokeStyle = this.options.color.hover; ctx.fillStyle = this.options.color.hover;} |
|
|
|
else {ctx.strokeStyle = this.options.color.color; ctx.fillStyle = this.options.color.color;} |
|
|
|
ctx.strokeStyle = this._getColor(); |
|
|
|
ctx.lineWidth = this._getLineWidth(); |
|
|
|
|
|
|
|
if (this.from != this.to) { |
|
|
@ -794,10 +789,7 @@ Edge.prototype._drawArrowCenter = function(ctx) { |
|
|
|
*/ |
|
|
|
Edge.prototype._drawArrow = function(ctx) { |
|
|
|
// set style
|
|
|
|
if (this.selected == true) {ctx.strokeStyle = this.options.color.highlight; ctx.fillStyle = this.options.color.highlight;} |
|
|
|
else if (this.hover == true) {ctx.strokeStyle = this.options.color.hover; ctx.fillStyle = this.options.color.hover;} |
|
|
|
else {ctx.strokeStyle = this.options.color.color; ctx.fillStyle = this.options.color.color;} |
|
|
|
|
|
|
|
ctx.strokeStyle = this._getColor(); |
|
|
|
ctx.lineWidth = this._getLineWidth(); |
|
|
|
|
|
|
|
var angle, length; |
|
|
@ -1015,7 +1007,7 @@ Edge.prototype._getDistanceToLine = function(x1,y1,x2,y2,x3,y3) { |
|
|
|
//# (i.e. remove the sqrt) to gain a little performance
|
|
|
|
|
|
|
|
return Math.sqrt(dx*dx + dy*dy); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
* This allows the zoom level of the network to influence the rendering |
|
|
|