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

Panning, modeChange Event, minor changes #939

Merged
merged 4 commits into from
Dec 28, 2023
Merged

Conversation

olekhshch
Copy link
Contributor

-- prDefault for pressing on mouse wheel to avoid firing of default browser's (e.g. Chrome) panning

-- quick access to the select mode while panning mode is active with dbClick. Also, the panning mode is active while holding Space/mousewheel - once they're released the mode changes back to the previous one. This allows a quicker use of both Select and Panning tools without a need to click them on the left panel.

-- new custom event was added in svgcanvas that fires on every setMode(). For now, the event helps to track the active mode to set cursor styling (atm only zoom, panning, and select tools have their own cursors, but I would like to add it for other tools for better UX). Also, this event can have different implementations in the future.

-- prDefault for Ctrl+wheel - I've added it based on my own experience because I always try to scale the canvas with this shortcut (instead of Shift+wheel), but it scales the whole page instead. Having this behavior here seems unnecessary, perhaps it would be better to allow this shortcut to scale the canvas as well in the future. 👀

-- Ctrl was added to the Undo/Redo shortcuts because the Z shortcut was already assigned for the Zoom tool.

@jfhenon
Copy link
Collaborator

jfhenon commented Dec 28, 2023

The build breaks because of the NYC coverage. The tests are working. Thank you for this PR.

@jfhenon jfhenon merged commit 19403a2 into SVG-Edit:master Dec 28, 2023
4 of 5 checks passed
@olekhshch olekhshch deleted the panning branch December 28, 2023 13:29
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.

2 participants