|
|
@ -1,5 +1,16 @@ |
|
|
|
import BezierEdgeBase from './util/BezierEdgeBase' |
|
|
|
|
|
|
|
/** |
|
|
|
* A Dynamic Bezier Edge. Bezier curves are used to model smooth gradual |
|
|
|
* curves in paths between nodes. The Dynamic piece refers to how the curve |
|
|
|
* reacts to physics changes. |
|
|
|
* |
|
|
|
* @param {Object} options |
|
|
|
* @param {Object} body |
|
|
|
* @param {Label} labelModule |
|
|
|
* @constructor BezierEdgeDynamic |
|
|
|
* @extends BezierEdgeBase |
|
|
|
*/ |
|
|
|
class BezierEdgeDynamic extends BezierEdgeBase { |
|
|
|
constructor(options, body, labelModule) { |
|
|
|
//this.via = undefined; // Here for completeness but not allowed to defined before super() is invoked.
|
|
|
@ -27,7 +38,7 @@ class BezierEdgeDynamic extends BezierEdgeBase { |
|
|
|
|
|
|
|
// when we change the physics state of the edge, we reposition the support node.
|
|
|
|
if (physicsChange === true) { |
|
|
|
this.via.setOptions({physics: this.options.physics}) |
|
|
|
this.via.setOptions({physics: this.options.physics}); |
|
|
|
this.positionBezierNode(); |
|
|
|
} |
|
|
|
} |
|
|
|