added shortcut key, fixed regression impacting other tools

This commit is contained in:
zsviczian
2023-10-06 16:38:37 +00:00
parent ca22a52102
commit 76795c7d1b
4 changed files with 3 additions and 4 deletions

View File

@@ -4620,7 +4620,7 @@ class App extends React.Component<AppProps, AppState> {
lastPointerUp = onPointerUp;
if (this.state.activeTool.type === "laser") {
if (!this.state.viewModeEnabled || this.state.activeTool.type === "laser") {
window.addEventListener(EVENT.POINTER_MOVE, onPointerMove);
window.addEventListener(EVENT.POINTER_UP, onPointerUp);
window.addEventListener(EVENT.KEYDOWN, onKeyDown);