Enhance the Navigate Tool zoom behavior (#461)

* Snap zoom

* Navigate zoom from centre

* Ctrl to snap zoom in navigate

* Use ctrl for global snap rotate

* Fix the rotation input on snap rotate

* Update hint to use ctrl

* Fix mouse centre on drag

* Click to zoom in

* Clean up centre zoom

* Update user input hints; tweak some variable names for clarity and standardization

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube 2022-01-08 16:30:03 +00:00 committed by Keavon Chambers
parent 26da229807
commit e39aa2a501
5 changed files with 250 additions and 145 deletions

View file

@ -438,13 +438,13 @@ impl JsEditorHandle {
/// Zoom in to the next step
pub fn increase_canvas_zoom(&self) {
let message = MovementMessage::IncreaseCanvasZoom;
let message = MovementMessage::IncreaseCanvasZoom { center_on_mouse: false };
self.dispatch(message);
}
/// Zoom out to the next step
pub fn decrease_canvas_zoom(&self) {
let message = MovementMessage::DecreaseCanvasZoom;
let message = MovementMessage::DecreaseCanvasZoom { center_on_mouse: false };
self.dispatch(message);
}