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