Open kiranshila opened 1 year ago
Ah, it seems the positioning of SetNodeScreenSpace
matters here. If I set the position before the call to BeginNode
I can no longer move nodes around
@kiranshila I just encountered the same problem as well, you can test my implementation of this feature It works in my project, I'm able now to save positions of nodes between save/load sessions If you have any questions on it, feel free to ask
Hey! First off, thanks for the great library!
I'm storing node data, including the positions in my own data structure and am a little stuck on how to update my representation of the positions.
When I draw the editor, I'm calling
ImNodes::SetNodeScreenSpacePosition
from a "realized" graph that contains its positions. Something in the background must be overwriting this behavior as I can drag a node around, but once I release a node - it of course snaps back to the position stored in my data structure.My question is, how can I intercept the result of node translation in order to update my representation? I tried something the likes of
But
GetNodeScreenSpacePos
doesn't seem to be set by the time my if block runs, as it still contains the original position.Any help would be appreciated.