default tool should be selection not hand in view mode

zsviczian-laserpointer-viewmode
zsviczian 2 years ago committed by GitHub
parent 25af9023d4
commit 4c5e196f25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2918,7 +2918,7 @@ class App extends React.Component<AppProps, AppState> {
if (event.key === KEYS.K && !event.altKey && !event[KEYS.CTRL_OR_CMD]) { if (event.key === KEYS.K && !event.altKey && !event[KEYS.CTRL_OR_CMD]) {
if (isLaserPointerActive(this.state)) { if (isLaserPointerActive(this.state)) {
this.setActiveTool({ this.setActiveTool({
type: this.state.viewModeEnabled ? "hand" : "selection", type: "selection",
}); });
} else { } else {
this.setActiveTool({ type: "laser" }); this.setActiveTool({ type: "laser" });
@ -2929,7 +2929,7 @@ class App extends React.Component<AppProps, AppState> {
if (this.state.viewModeEnabled) { if (this.state.viewModeEnabled) {
//revert to hand in case a key is pressed (K is handled above) //revert to hand in case a key is pressed (K is handled above)
if (event.key !== KEYS.K) { if (event.key !== KEYS.K) {
this.setActiveTool({ type: "hand" }); this.setActiveTool({ type: "selection" });
} }
return; return;
} }

Loading…
Cancel
Save