Comments (7)
Yeah, we can keep it open for now.
It'd be great to have a new example submission if you have some code lying around 👍
from imnodes.
I found out, by studying the imnodes source code, that I can use
imnodes::PushAttributeFlag(imnodes::AttributeFlags_EnableLinkDetachWithDragClick);
to enable the deletion of a link by dragging it away from a pin, but I still don't understand what's the default interaction expected to trigger a link deletion.
from imnodes.
Hi @beddueimpossibile !
Indeed, figuring out how user interaction is supposed to work isn't the easiest thing at the moment 😞
By default, the user is responsible for deleting links. The idea is that you can delete a link by simply removing the link from your internal data structures. Nothing else needs to be done, since by default, the link is fixed in place.
IsLinkDestroyed
, like you discovered, is for situations where the user enables detach via click and drag. In this case,imnodes
signals to the user code that a link needs to be deleted through IsLinkDestroyed
. The function doesn't do anything else, since the assumption is that the link lives in the user code's data structures.
Hope this helped! And I'll try to get around to writing a bigger tutorial covering all the user interaction modes available currently.
from imnodes.
Now it's clear, thank you for the prompt reply and the explanation!
Probably I can close this issue, or leave it open to remember us about the example code covering this.
I can write an example myself and send a PR after I got a little more confident with the extension, if you wish!
from imnodes.
I wonder if making using user supplied unique ids, instead of grabbing them from the pointer would help (along with other things) ?
As suggested here by @sonoro1234
rokups/ImNodes#21 (comment)
from imnodes.
I wonder if making using user supplied unique ids, instead of grabbing them from the pointer would help (along with other things) ?
This was a suggestion for rokups implementation as Nelarius already takes user supplied unique ids.
from imnodes.
Oops, the names are so similar I got confused about which one I was reading, apologies for the noise !
from imnodes.
Related Issues (20)
- 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
- node double click event HOT 1
- Isn't this maintained anymore? HOT 2
- IM_OFFSETOF deprecation
- Question: Creating a NESTED canvas?
- Make node, pins and links work with BeginPopupContextItem
- IsEditorHovered only works between Begin/EndNodeEditor
- Cmake cannot find imgui config ?
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.