imgui-node-editor icon indicating copy to clipboard operation
imgui-node-editor copied to clipboard

QueryNewLink returning false when hovering other node

Open urosidoki opened this issue 2 years ago • 1 comments

Hi,

I noticed that during the drag and drop process of creating a new link, the QueryNewLink function stop returning true when we are hovering other nodes. I was wondering if that is normal and what is the intention behind that.

Cheers!

urosidoki avatar Sep 20 '21 17:09 urosidoki

Yes, this is normal. QueryNewLink is covering two cases:

  • droping link from pin to background, which allow to open menu or create new node at drop point
  • connecting two pins

I never had a need to drop link on a node itself. Right now it is considered invalid state. It is possible to make this operation valid, but that would require an API change/update, so you can receive node ID instead of pin ID.

thedmd avatar Nov 17 '21 21:11 thedmd