Skip to content
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

Replace locking/unlocking of canvas with select/pan mode #1050

Merged
merged 7 commits into from
Oct 1, 2024
Merged

Conversation

huchenlei
Copy link
Member

Closes #1011

Press space now enters pan mode, i.e. the whole canvas is read-only, only view change. Locking icon replaced with pan icon.

pan_mode.mp4

Copy link

socket-security bot commented Oct 1, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@comfyorg/litegraph@0.7.81 None 0 0 B

🚮 Removed packages: npm/@comfyorg/litegraph@0.7.80

View full report↗︎

@huchenlei huchenlei merged commit 5d957a0 into main Oct 1, 2024
9 checks passed
@huchenlei huchenlei deleted the pan branch October 1, 2024 00:20
@JorgeR81
Copy link

JorgeR81 commented Oct 1, 2024

I'm constantly planning to change settings.

Instead of a keybind to switch between modes, could we also have a shortcut like ALT or SHIFT + click and drag to pan ?

It may be some 3D software I used, but this seems more natural to me.

@huchenlei
Copy link
Member Author

I'm constantly planning to change settings.

Instead of a keybind to switch between modes, could we also have a shortcut like ALT or SHIFT + click and drag to pan ?

It may be some 3D software I used, but this seems more natural to me.

Custom keybinding config system is coming soon. There is just not a keybinding that suits everyone.

@JorgeR81
Copy link

JorgeR81 commented Oct 1, 2024

Custom keybinds would be great !

Could this make a distinction between press down and press up ?

For instance, could it be possible to enter pan mode on press down and leave it on press up, instead of just clicking to switch between modes.

@JorgeR81
Copy link

JorgeR81 commented Oct 1, 2024

For instance, could it be possible to enter pan mode on press down and leave it on press up, instead of just clicking to switch between modes.

Oh, just tried ! That is the way it works now !

The visual feedback on the cursor is also great.

@ronan36880
Copy link

I'm constantly planning to change settings.
Instead of a keybind to switch between modes, could we also have a shortcut like ALT or SHIFT + click and drag to pan ?
It may be some 3D software I used, but this seems more natural to me.

Custom keybinding config system is coming soon. There is just not a keybinding that suits everyone.

Would the custom keybinding config system allow me to still immediately enter panning mode without pressing any mouse buttons? I'm guessing this PR is just one of many that will improve on this, but as it stands, v1.3.4 breaks a core feature that i'm used to. And as far as I'm aware, it's not really possible to workaround in my usecase, since I'm already holding the LMB when I press Space.

The following video was recorded on v1.3.3:

Chrome.2024-10-01.14-05-39.mp4

@JorgeR81
Copy link

JorgeR81 commented Oct 1, 2024

Would the custom keybinding config system allow me to still immediately enter panning mode without pressing any mouse buttons? I'm guessing this PR is just one of many that will improve on this, but as it stands, v1.3.4 breaks a core feature that i'm used to. And as far as I'm aware, it's not really possible to workaround in my usecase, since I'm already holding the LMB when I press Space.

Nice !

I didn't know about this. It could be very useful !

Normally I use cg-use-everywhere to make connections in large workflows, but we should have a solution without custom nodes, like this one.

@lldacing
Copy link

lldacing commented Oct 5, 2024

I'm constantly planning to change settings.
Instead of a keybind to switch between modes, could we also have a shortcut like ALT or SHIFT + click and drag to pan ?
It may be some 3D software I used, but this seems more natural to me.

Custom keybinding config system is coming soon. There is just not a keybinding that suits everyone.

Would the custom keybinding config system allow me to still immediately enter panning mode without pressing any mouse buttons? I'm guessing this PR is just one of many that will improve on this, but as it stands, v1.3.4 breaks a core feature that i'm used to. And as far as I'm aware, it's not really possible to workaround in my usecase, since I'm already holding the LMB when I press Space.

The following video was recorded on v1.3.3:

Chrome.2024-10-01.14-05-39.mp4

You can try https://github.com/niknah/quick-connections

@JorgeR81
Copy link

JorgeR81 commented Oct 5, 2024

You can try https://github.com/niknah/quick-connections

I've played around with the demo ( https://niknah.github.io/quick-connections/quick_conn.html?nodebug=1 )

It's a good idea. It would be nice have something like this in the core.

But it should have an option to only show the quick connections for nodes that are out of the screen.

demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Pan / Select mode switch with "Space" key
4 participants