GithubHelp home page GithubHelp logo

Comments (3)

Nelarius avatar Nelarius commented on August 22, 2024

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.

jonathan2222 avatar jonathan2222 commented on August 22, 2024

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.

Nelarius avatar Nelarius commented on August 22, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.