Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit 00dfc43

Browse files
Kr0noxEntenwilli
authored andcommitted
fix ports snapping to ports
1 parent 2adb2fc commit 00dfc43

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/features/dfdElements/portSnapper.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ export class PortAwareSnapper implements ISnapper {
5151
private snapPort(position: Point, element: SPortImpl): Point {
5252
const parentElement = element.parent;
5353

54+
if (!(parentElement instanceof SNodeImpl)) {
55+
// Parent is not a node, so we cannot snap the port to the node edges
56+
return position;
57+
}
58+
5459
if (!isBoundsAware(parentElement)) {
5560
// Cannot get the parent size, just return the original position and don't snap
5661
return position;

0 commit comments

Comments
 (0)