-
Notifications
You must be signed in to change notification settings - Fork 66
Add canvasNavigationMode for changing left click pan behaviour #1108
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit test
When you receive a test error about the snapshots, it is usually because a public field has changed. In this case, it is the new property on LiteGraph global object. This guards against unintended API changes.
Please run the vitest update command:
npm run test -- -u --run
Once done, you need to manually verify that the snapshot change is exactly what you expected, then commit it.
Playwright test
This failure may be unrelated. It's complaining about a missing PyPI package for templates. Re-running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great overall!
Apologies in advance - you will probably find the nits in litegraph PRs a bit stricter. Litegraph is an external library that is already written in many styles. I try to ensure code changes match a single new style as much as possible, so it's easier for everyone to work with moving forward.
p.s. I often use GH suggestions for the nits, so you can just click the commit button if it's easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question on recent mac change & nits.
51abbe1
to
0423b7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good - let's get it tested. I -think- I see some small things which might impact UX - but requires testing on Mac.
(optional reading / notes: difference moving from e.wheelDelta* / e.detail to e.deltaY - something we should definitely do, but I did not impl. because it required too much workaround code last year - this could just be solved already)
LGTM @webfiltered can we merge this? |
Waiting on Comfy-Org/ComfyUI_frontend#4377 to be finalised. No point merging if it hasn't had final sign off. |
Discussed offline: This is fine to merge, but on its own does nothing for frontend. To reduce unnecessary overheads / chasing unrelated bugs, it will be merged immediately prior to the frontend PR (after subgraph + async are finalised). |
Merging now so frontend PR can use updated types. |
Feature required in ComfyUI Project V3 https://www.notion.so/drip-art/Standardize-Canvas-Navigation-2166d73d365080c9b84ad3f7b3b265bc?d=21f6d73d3650805eb3d2001ca7e88ed6#2176d73d3650802a9457dc2affe798e0
And it will be used in ComfyUI Frontend PR here.
it will have two mode: standard and legacy.
On standard mode (this is new), we will disable dragging canvas by mouse left click pan, and move canvas will be allowed by mouse middle button or spacebar+left-click