Skip to content

How to import connection #621

Closed Answered by linonetwo
linonetwo asked this question in Q&A
May 2, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

editor.getNode(connectionData.from.id) is undefined, after editor.addNode(node). I will check why.

The connection data is exported by

    data.connections.push(
      {
        id: connection.id,
        from: {
          id: connection.source,
          portName: connection.sourceOutput,
        },
        to: {
          id: connection.target,
          portName: connection.targetInput,
        },
      } satisfies IConnectionExportedJSON,
    );

Maybe node id here is wrong.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@linonetwo
Comment options

@Ni55aN
Comment options

Answer selected by linonetwo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants