Comments (3)
Hi @jonathan2222 ! It should be doable, just requires some trickery with the draw channels. I'll see what I can do once I make some progress on one of the previous issues 👍
If you're itching to try it out, I think the following change inside the EndNodeEditor
function should work:
diff --git a/imnodes.cpp b/imnodes.cpp
index 286abc6..6535738 100644
--- a/imnodes.cpp
+++ b/imnodes.cpp
@@ -2107,7 +2107,7 @@ void EndNodeEditor()
object_pool_update(editor.pins);
draw_list_sort_channels_by_depth(editor.node_depth_order);
- draw_list_merge_channels();
+ g.canvas_draw_list->ChannelsSetCurrent(0);
for (int link_idx = 0; link_idx < editor.links.pool.size(); ++link_idx)
{
@@ -2117,6 +2117,8 @@ void EndNodeEditor()
}
}
+ g.canvas_draw_list->ChannelsMerge();
+
// After the links have been rendered, the link pool can be updated as well.
object_pool_update(editor.links);
I'm going to have to do some more testing on my end though and clean up the code a bit!
from imnodes.
Hi @Nelarius! Thank you for the fast reply!
That change inside the EndNodeEditor
function worked really nice, the only problem is that I can still interact with the links when hovering over the nodes. I will use this for the time being and wait for the update.
I really appreciate the work you have put into this, thank you! 👌
from imnodes.
@jonathan2222 I pushed the change in 8ecdd39. Added some additional logic to inhibit link interaction when overlapped with a node. 🙂
from imnodes.
Related Issues (20)
- create links programmatically? HOT 1
- PushStyleVar(ImNodesStyleVar_LinkThickness, ...) doesn't work. HOT 6
- Very slow with many nodes HOT 1
- IsEditorHovered does not see the mouse.
- [Question] Is there a function to retrieve all nodes a node connects to?
- Output pin text not rendering correctly. HOT 2
- Using a CollapsingHeader/treenode inside a node, it's ui goes out of bounds of the node; HOT 1
- Callback on node translation HOT 2
- Mis-Entering BoxSelection Interaction. HOT 2
- phantom TitleBar rect glitch when conditionnal call to BeginNodeTitleBar
- [Feature Request] Vertical Pins HOT 3
- Node id's are overlapped when we have many attributes and nodes. HOT 1
- emscripten + Saving editor state
- Canvas on nodes HOT 3
- Overlapping nodes aren't compatible with ImGui::BeginDragDropTarget() HOT 1
- Style
- Popup over Grid/Node? HOT 1
- Doesn't work with BeginChild HOT 2
- Compute graph example - multiple outputs? HOT 1
- NodeAnimation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imnodes.