From 50fa1da902634f7e8eca204412a061805b8c0cad Mon Sep 17 00:00:00 2001 From: Ihsen Bouallegue <48621967+IhsenBouallegue@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:16:25 +0100 Subject: [PATCH] Change camera zoom alternate mode key (#3832) * fix(threeMapControls): toggle zoomToCursor on Shift key press * fix(threeMapControls): toggle zoomToCursor on Shift key press * feat(visualization): add changelog entry (#3776) * fix(visualization): change modifier key to Alt for alternate zoom mode (#3776) * fix(visualization): update changelog to reflect ALT key for center-focused zoom option --------- Co-authored-by: IhsenBouallegue Co-authored-by: Sebastian Wolf <65733509+phanlezz@users.noreply.github.com> --- visualization/CHANGELOG.md | 2 +- .../ui/codeMap/threeViewer/threeMapControls.service.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/visualization/CHANGELOG.md b/visualization/CHANGELOG.md index 9fddf0e74e..9db3f44b96 100644 --- a/visualization/CHANGELOG.md +++ b/visualization/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/) ### Added ๐Ÿš€ -- Add alternative center-focused zoom option via the `๐Ÿกน Shift`-key [#3815](https://github.com/MaibornWolff/codecharta/pull/3815) +- Add alternative center-focused zoom option via the `ALT`-key [#3815](https://github.com/MaibornWolff/codecharta/pull/3815) - Add an apply button when selecting maps [#3637](https://github.com/MaibornWolff/codecharta/pull/3637) ### Fixed ๐Ÿž diff --git a/visualization/app/codeCharta/ui/codeMap/threeViewer/threeMapControls.service.ts b/visualization/app/codeCharta/ui/codeMap/threeViewer/threeMapControls.service.ts index ad77c0a6ae..7552db79fc 100644 --- a/visualization/app/codeCharta/ui/codeMap/threeViewer/threeMapControls.service.ts +++ b/visualization/app/codeCharta/ui/codeMap/threeViewer/threeMapControls.service.ts @@ -127,12 +127,12 @@ export class ThreeMapControlsService { } window.addEventListener("keydown", event => { - if (event.key === "Shift") { + if (event.key === "Alt") { this.controls.zoomToCursor = false } }) window.addEventListener("keyup", event => { - if (event.key === "Shift") { + if (event.key === "Alt") { this.controls.zoomToCursor = true } })