Explorar o código

Adjusted elbow in-shape binding strategy

Mark Tolmacs hai 6 meses
pai
achega
03b91deb4a
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      packages/element/src/binding.ts

+ 3 - 0
packages/element/src/binding.ts

@@ -965,6 +965,9 @@ export const bindPointToSnapToElementOutline = (
           otherPoint,
         ),
       ),
+    ).sort(
+      (g, h) =>
+        pointDistanceSq(g, adjacentPoint) - pointDistanceSq(h, adjacentPoint),
     )[0];
   } else {
     intersection = intersectElementWithLineSegment(