Add minimap auto-show for zoom button/hotkey interactions

- Emit view:navigate event in animatedZoomView onStart callback
- Minimap now appears when using zoom buttons (in/out/reset/fit)
- Minimap now appears when using zoom hotkeys (Ctrl+/-/0/1)
- Auto-hides after 2 seconds as expected
- Applies to all animated zoom operations consistently
pan-zoom
dimitrieh 2025-09-30 14:21:52 +02:00 committed by Nick O'Leary
parent 79918f0187
commit 47026ec744
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 4 additions and 0 deletions

View File

@ -3119,6 +3119,10 @@ RED.view = (function() {
outer.attr("width", space_width * scaleFactor).attr("height", space_height * scaleFactor); outer.attr("width", space_width * scaleFactor).attr("height", space_height * scaleFactor);
RED.view.navigator.resize(); RED.view.navigator.resize();
}, },
onStart: function() {
// Show minimap when zoom animation starts
RED.events.emit("view:navigate");
},
onEnd: function() { onEnd: function() {
cancelInProgressAnimation = null; cancelInProgressAnimation = null;
// Ensure scaleFactor is exactly the target to prevent precision issues // Ensure scaleFactor is exactly the target to prevent precision issues