Nelarius / imnodes

A small, dependency-free node editor for dear imgui
MIT License
1.97k stars 241 forks source link

added GetOrCreateNodeEditorSpacePos #148

Open sivu opened 2 years ago

sivu commented 2 years ago

Added GetOrCreateNodeEditorSpacePos that uses ObjectPoolFindOrCreateObject instead of asserting like GetNodeEditorSpacePos

Nelarius commented 2 years ago

Hi @sivu !

What happens when there is no node? What are you using position for? Just thinking that some kind of mechanism is probably required in case the function is called with a node id which hasn't yet been referenced.