This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 138
Node zoom #101
Open
hakolao
wants to merge
23
commits into
setzer22:main
Choose a base branch
from
hakolao:node-zoom
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Node zoom #101
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Might be that the clip rect should be adjusted. Don't mind a fix! |
This fixes the problem for me but I am still wondering why the Still learning egui... |
Hello @setzer22 , is there a chance this PR will be accepted? |
Because I use this in my project, I've kept the fork up to date. Still find it very usable :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The node graph needs zoom badly.
So here is an implementation inspired by https://github.com/gzp-crey/shine, and the style scaling was copied from there as well.
Because this is just me updating stuff from a fork, this also contains egui 0.22, and placement of node rather to finder window pos than mouse pos (mouse can be outside graph area when finder window is large).
PanZoom
, it uses parent ui's style by default, but when in a zoomed state, a scaled style is usedAll in all, this seems to work pretty well... though not optimal, pan_zoom's scale needs to be used in a couple of places... But better than having double egui context in my opinion.
What it looks like:
Recording.2023-06-13.233343.mp4
Feel free to edit MAX, MIN zooms and anything that should be changed...