-
Notifications
You must be signed in to change notification settings - Fork 547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to Suspend/Resume Canvas zoom? #219
Comments
Please, see #220 for a suggestion on how to implement it. |
Answer to your question depends on the version of ImGui you're using. With ImGui 1.89 and With older ImGui or node editor your workaround looks reasonable. Works for happy path. Can trip on some exotic edge cases but I didn't found any obvious way to invoke such scenarios. Are you able to confirm update does solve your problem? |
Hello, Thank you for the quick answer!
I had not realised v1.89 offered such feature. Thank you for sharing! My project is running under v1.88, however, and I have so many things to do that I don't see myself trying to update right now.
I will close this issue and I will let you (of course) decide what to do with the pull request. After all, if v1.89 allows for a less invasive solution, you may want to go in that direction. I think I will eventually check this but it might take months before I actually do it. So, maybe, you can leave the pull request open and I will update it whether I find problems with the current implementation or switch to v1.89. Best! |
Hello,
I would like to be able to use the mouse wheel for other things than zooming inand out in the canvas.
I am aware of the API to set custom zoom levels through the config #174
I was thinking of switching between a range of pre-defined zoom levels and an ImVector that contains only 1 zoom level (the current zoom level). That way, even if the user uses the mouse scroll, the zoom level will not change.
something along the lines of:
but the
ed::GetConfig(ed::GetCurrentEditor());
returns a const reference
So, it seems custom zoom levels can only be set before the context is created. Is this correct?
I was also thinking of accessing the NavigateAction and try to use either StopNavigation or FinishNavigation but I couldn't find a way to use GetCurrentAction since the global API gives access to
ax::NodeEditor::EditorContext
and not the internal counter partax::NodeEditor::Detail::EditorContext
.So, I'll probably go meddle in the source code and try to add a few access methods to the global API.
But, maybe I missed something (obvious?). Could anyone be kind enough to point it out?
Thank you in advance!
The text was updated successfully, but these errors were encountered: