@ngroznykh/papirus 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,18 +21,14 @@ export declare class EdgeEndpointUpdater {
21
21
  private resolveEdgeEndpoint;
22
22
  private lockAnchors;
23
23
  /**
24
- * When nodes are clearly stacked, retarget unset / OEF-lateral ports toward
25
- * facing sides. Intentional same-side wraps (bottom→bottom, top→top, left→left)
26
- * are kept — orthogonal routing clears them around the stack.
24
+ * When nodes are clearly stacked/side-by-side, assign facing sides only to
25
+ * unset endpoints. Intentional ports (including lateral reconnect with
26
+ * attachToOutline off) and outlineParams are kept — orthogonal routing clears
27
+ * same-side wraps around the stack.
27
28
  *
28
29
  * Uses bounding-box gaps (not center dx/dy): a large horizontal offset must not
29
30
  * flip bottom→left while the source is still below the target — that reintroduces
30
31
  * the left-edge contour jog when the user drags the node leftward.
31
- *
32
- * - Works for portId and outlineParam (OEF / attach-to-outline).
33
- * - Does NOT move an endpoint that is already on a chosen side — otherwise
34
- * dragging a locked/outline anchor snaps back on every updateAll.
35
- * - Keeps intentional source left/right exits for nest wrap around a parent.
36
32
  */
37
33
  private preferFacingSidePorts;
38
34
  private portSide;
@@ -1 +1 @@
1
- {"version":3,"file":"EdgeEndpointUpdater.d.ts","sourceRoot":"","sources":["../../src/core/EdgeEndpointUpdater.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOrD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,IAAI,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACtC,QAAQ,IAAI,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACtC,gBAAgB,IAAI,YAAY,EAAE,CAA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EG;IACH,OAAO,CAAC,sBAAsB;IA8C9B,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,mBAAmB;IAe3B,OAAO,CAAC,WAAW;IAqBnB;;;;;;;;;OASG;IACH,OAAO,CAAC,qBAAqB;IA2C7B,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,mBAAmB;IAmB3B,OAAO,CAAC,mBAAmB;IAqB3B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IA6B3B,OAAO,CAAC,uBAAuB;CAOhC"}
package/dist/papirus.js CHANGED
@@ -8391,18 +8391,14 @@ var EdgeEndpointUpdater = class {
8391
8391
  }
8392
8392
  }
8393
8393
  /**
8394
- * When nodes are clearly stacked, retarget unset / OEF-lateral ports toward
8395
- * facing sides. Intentional same-side wraps (bottom→bottom, top→top, left→left)
8396
- * are kept — orthogonal routing clears them around the stack.
8394
+ * When nodes are clearly stacked/side-by-side, assign facing sides only to
8395
+ * unset endpoints. Intentional ports (including lateral reconnect with
8396
+ * attachToOutline off) and outlineParams are kept — orthogonal routing clears
8397
+ * same-side wraps around the stack.
8397
8398
  *
8398
8399
  * Uses bounding-box gaps (not center dx/dy): a large horizontal offset must not
8399
8400
  * flip bottom→left while the source is still below the target — that reintroduces
8400
8401
  * the left-edge contour jog when the user drags the node leftward.
8401
- *
8402
- * - Works for portId and outlineParam (OEF / attach-to-outline).
8403
- * - Does NOT move an endpoint that is already on a chosen side — otherwise
8404
- * dragging a locked/outline anchor snaps back on every updateAll.
8405
- * - Keeps intentional source left/right exits for nest wrap around a parent.
8406
8402
  */
8407
8403
  preferFacingSidePorts(edge, fromNode, toNode) {
8408
8404
  if (!edge.lockAnchors) return;
@@ -8420,19 +8416,15 @@ var EdgeEndpointUpdater = class {
8420
8416
  if (fromBelow > 0 || fromAbove > 0) {
8421
8417
  const fromSide = fromBelow > 0 ? "top" : "bottom";
8422
8418
  const toSide = fromBelow > 0 ? "bottom" : "top";
8423
- const toOutlineLateral = (curTo === "left" || curTo === "right") && isNodeEdgeEndpoint(edge.to) && edge.to.outlineParam !== void 0;
8424
- const toPortLateral = (curTo === "left" || curTo === "right") && !toOutlineLateral;
8425
8419
  if (!curFrom) this.setEndpointSidePort(edge, "from", fromNode, fromSide, tc);
8426
- if (!curTo || toPortLateral) this.setEndpointSidePort(edge, "to", toNode, toSide, fc);
8420
+ if (!curTo) this.setEndpointSidePort(edge, "to", toNode, toSide, fc);
8427
8421
  return;
8428
8422
  }
8429
8423
  if (fromLeft > 0 || fromRight > 0) {
8430
8424
  const fromSide = fromRight > 0 ? "left" : "right";
8431
8425
  const toSide = fromRight > 0 ? "right" : "left";
8432
- const toOutlineVertical = (curTo === "top" || curTo === "bottom") && isNodeEdgeEndpoint(edge.to) && edge.to.outlineParam !== void 0;
8433
- const toPortVertical = (curTo === "top" || curTo === "bottom") && !toOutlineVertical;
8434
8426
  if (!curFrom) this.setEndpointSidePort(edge, "from", fromNode, fromSide, tc);
8435
- if (!curTo || toPortVertical) this.setEndpointSidePort(edge, "to", toNode, toSide, fc);
8427
+ if (!curTo) this.setEndpointSidePort(edge, "to", toNode, toSide, fc);
8436
8428
  }
8437
8429
  }
8438
8430
  portSide(portId) {