Browse Source

Merge pull request #856 from killerDJO/develop

fixed colors for selected and hover states
flowchartTest
Alex 9 years ago
parent
commit
b6085ebbd0
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      lib/network/modules/components/edges/util/EdgeBase.js

+ 5
- 5
lib/network/modules/components/edges/util/EdgeBase.js View File

@ -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);

Loading…
Cancel
Save