You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert.checkDataPath(d,'M 25 0 L 25 -28 L 100 -28 L 100 150 L -28 150 L -28 175 L 0 175','Source above target with vertex inside the target element bbox');
2626
2626
});
2627
+
2628
+
QUnit.test('rightAngle routing with source anchor outside the element bbox',function(assert){
2629
+
// Source `top` anchor offset above the element — outside the element bbox.
2630
+
// The router must include the anchor in its source bbox union so the routing
2631
+
// area reflects where the anchor actually sits, not just the element body.
assert.notOk(r1.getBBox().containsPoint(linkView.sourceAnchor),'Source anchor is outside the element bbox');
2639
+
assert.checkDataPath(linkView.metrics.data,'M 25 -50 L 25 -78 L 78 -78 L 78 100 L 25 100 L 25 150','Source anchor 50px above the element');
2640
+
2641
+
// Move the anchor 1px further up. The segments derived from the source bbox
2642
+
// union (the first three points) must shift by 1px as well.
2643
+
l.source(l.getSourceCell(),{
2644
+
anchor: {name: 'top',args: {dy: -51}}
2645
+
});
2646
+
2647
+
assert.notOk(r1.getBBox().containsPoint(linkView.sourceAnchor),'Source anchor is still outside the element bbox');
2648
+
assert.checkDataPath(linkView.metrics.data,'M 25 -51 L 25 -79 L 78 -79 L 78 100 L 25 100 L 25 150','Source anchor 51px above the element — path shifts by 1px');
0 commit comments