Is it possible to connect nodes that are not on the same level in the DOM?
See original GitHub issueFirst thank you for this very nice project! Let me explain my need on an example. Suppose the DOM tree is
body
div
div of id A
div of id B
I want to connect A and B. Is it possible?
I tried to connect it but I get the error
Uncaught (in promise) TypeError: this.drawflow.drawflow[t] is undefined
getNodeFromId https://cdn.jsdelivr.net/gh/jerosoler/Drawflow/dist/drawflow.min.js:1
addConnection https://cdn.jsdelivr.net/gh/jerosoler/Drawflow/dist/drawflow.min.js:1
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Connect nodes at same level using constant extra space
Write a function to connect all the adjacent nodes at the same level in a binary tree. The structure of the given Binary...
Read more >can adjacent text nodes in the DOM be merged with Javascript?
It is possible, but you need to specify the parent element. It should be possible to traverse the whole DOM and every node,...
Read more >Understanding the DOM Tree and Nodes - Alibaba Cloud
This post is written as a guide to some of the concepts and terms related to the DOM tree and nodes.
Read more >JavaScript HTML DOM Navigation - W3Schools
With the HTML DOM, you can navigate the node tree using node relationships. ... Siblings (brothers or sisters) are nodes with the same...
Read more >How To Access Elements in the DOM - DigitalOcean
You can do the same in plain JavaScript with the querySelector() and querySelectorAll() methods. document.querySelector(); document.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes it’s possible.
In this case I use an output displacement technique. I use the class link followed by the output to which it is directed to move the element.
In this case it is only done for the outputs and new nodes, the same would have to be done with the import event.
I put the complete code of the example.
Are they multiple nodes? If there are multiple nodes, have you thought about adding a new editor to a drawflow node? Maybe that could be your solution.
If it’s not multiple nodes and it’s just style, does it mean something like this?