|
|
@ -33,7 +33,7 @@ class EdgeBase { |
|
|
|
*/ |
|
|
|
drawLine(ctx, selected, hover) { |
|
|
|
// set style
|
|
|
|
ctx.strokeStyle = this.getColor(ctx); |
|
|
|
ctx.strokeStyle = this.getColor(ctx, selected, hover); |
|
|
|
ctx.lineWidth = this.getLineWidth(selected, hover); |
|
|
|
let via = undefined; |
|
|
|
if (this.options.dashes !== false) { |
|
|
@ -256,7 +256,7 @@ class EdgeBase { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getColor(ctx) { |
|
|
|
getColor(ctx, selected, hover) { |
|
|
|
let colorOptions = this.options.color; |
|
|
|
if (colorOptions.inherit !== false) { |
|
|
|
// when this is a loop edge, just use the 'from' method
|
|
|
@ -306,10 +306,10 @@ class EdgeBase { |
|
|
|
this.colorDirty = false; |
|
|
|
|
|
|
|
|
|
|
|
if (this.selected === true) { |
|
|
|
if (selected === true) { |
|
|
|
return this.color.highlight; |
|
|
|
} |
|
|
|
else if (this.hover === true) { |
|
|
|
else if (hover === true) { |
|
|
|
return this.color.hover; |
|
|
|
} |
|
|
|
else { |
|
|
@ -409,7 +409,7 @@ class EdgeBase { |
|
|
|
*/ |
|
|
|
drawArrowHead(ctx, position, viaNode, selected, hover) { |
|
|
|
// set style
|
|
|
|
ctx.strokeStyle = this.getColor(ctx); |
|
|
|
ctx.strokeStyle = this.getColor(ctx, selected, hover); |
|
|
|
ctx.fillStyle = ctx.strokeStyle; |
|
|
|
ctx.lineWidth = this.getLineWidth(selected, hover); |
|
|
|
|
|
|
|