|
|
@ -40,7 +40,7 @@ class EdgeBase { |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
let [x,y,radius] = this._getCircleData(); |
|
|
|
let [x,y,radius] = this._getCircleData(ctx); |
|
|
|
this._circle(ctx, x, y, radius); |
|
|
|
} |
|
|
|
|
|
|
@ -116,7 +116,7 @@ class EdgeBase { |
|
|
|
to = this._findBorderPosition(this.to, ctx); |
|
|
|
} |
|
|
|
else { |
|
|
|
let [x,y,radius] = this._getCircleData(); |
|
|
|
let [x,y,radius] = this._getCircleData(ctx); |
|
|
|
|
|
|
|
from = this._findBorderPositionCircle(this.from, ctx, {x, y, low:0.25, high:0.6, direction:-1}); |
|
|
|
to = this._findBorderPositionCircle(this.from, ctx, {x, y, low:0.6, high:0.8, direction:1}); |
|
|
@ -124,11 +124,17 @@ class EdgeBase { |
|
|
|
return {from, to}; |
|
|
|
} |
|
|
|
|
|
|
|
_getCircleData() { |
|
|
|
_getCircleData(ctx) { |
|
|
|
let x, y; |
|
|
|
let node = this.from; |
|
|
|
let radius = this.options.selfReferenceSize; |
|
|
|
|
|
|
|
if (ctx !== undefined) { |
|
|
|
if (node.shape.width === undefined) { |
|
|
|
node.shape.resize(ctx); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// get circle coordinates
|
|
|
|
if (node.shape.width > node.shape.height) { |
|
|
|
x = node.x + node.shape.width * 0.5; |
|
|
@ -435,7 +441,7 @@ class EdgeBase { |
|
|
|
else { |
|
|
|
// draw circle
|
|
|
|
let angle, point; |
|
|
|
let [x,y,radius] = this._getCircleData(); |
|
|
|
let [x,y,radius] = this._getCircleData(ctx); |
|
|
|
|
|
|
|
if (position == 'from') { |
|
|
|
point = this.findBorderPosition(this.from, ctx, {x, y, low:0.25, high:0.6, direction:-1}); |
|
|
|