Skip to content

Intermittent bug in dragNewLink with allowLooseLinks = false #1027

Open
@tauren

Description

I'm nearing completion on an app built with this great tool and am trying to clean up some loose ends (pun intended). I need to prevent any dangling links from being created.

I found the following snippet within the Simple Flow Example, which looked promising:

      const state = engine.getStateMachine().getCurrentState();
      if (state instanceof DefaultDiagramState) {
        state.dragNewLink.config.allowLooseLinks = false;
      }

However, it appears to work only sometimes. If I repeatedly attempt to create dangling links, many are removed, but some remain. This happens quite frequently in my app and is replicable in the online demo linked above.

Screen.Recording.2024-01-23.at.8.04.09.PM.mov

I'm not even sure where to begin attempting to debug this. Open to suggestions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions