GithubHelp home page GithubHelp logo

Comments (8)

Nelarius avatar Nelarius commented on August 22, 2024 1

Hi @leifhelm! I'm not 100 % I understood what you mean. For two days now, it's possible to do this using the master branch:

link_detach_demo

You can reconnect a detached link to any pin, and the link will be created again (i.e. IsLinkCreated will return true). Doing this is sort of broken in the color-node example though, I need to do a massive refactor to the code there 🙈

from imnodes.

r-lyeh avatar r-lyeh commented on August 22, 2024

Also, in UE4:

  • CTRL+clicking on an input or output pin will disconnect current pin and attach wire to mouse cursor, so you can reconnect the link to some other input/output pin very quickly.
  • ALT+clicking on an input/output pin will remove hovered pin connection.
  • ALT+clicking on a link will remove link plus and its connected pins.

from imnodes.

Nelarius avatar Nelarius commented on August 22, 2024

The CTRL + click is a good idea - it would let you disconnect the wire/link while letting you drag new links from the pin 👍

from imnodes.

leifhelm avatar leifhelm commented on August 22, 2024

Dragging from an output pin to reconnect could also be an option, if only one link can be connected to an output.

from imnodes.

leifhelm avatar leifhelm commented on August 22, 2024

I was wondering if you could enable/disable this on a per attribute basis. This would enable multiple connections if they sould be possible. I plan on enabling one output to be distributed to many inputs but an input sould only have one connection.

PS: I too noticed that the examples are broken and not enable this. Furthermore, it is possible to right click outside of the windows in the examples and still open the context menu. (probably missing something like a ImGui::IsWindowHovered() check)

from imnodes.

Nelarius avatar Nelarius commented on August 22, 2024

Okay yes, now I see! Yes, something like that could be done -- I was actually thinking about adding some sort of options for enabling/disabling this feature, exactly for the use-case you are talking about! But enabling it on a per-attribute basis is probably the most general way of doing it. 🙂

Furthermore, it is possible to right click outside of the windows in the examples and still open the context menu. (probably missing something like a ImGui::IsWindowHovered() check)

🙈 Noted, I will try to fix soon. Once I'm happy with some of the bigger changes here, I will try to rework that example.

from imnodes.

Nelarius avatar Nelarius commented on August 22, 2024

Updated the parent comment with my current plans for detaching links.

from imnodes.

Nelarius avatar Nelarius commented on August 22, 2024

All right, detaching by clicking and dragging can be enabled on a pin-by-pin basis, and links can also be detached by left-clicking on them with a modifier pressed (the link wire will jump to the mouse cursor). Calling this done for now 🙂

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.