toggle laser in view mode on double tap
This commit is contained in:
parent
76795c7d1b
commit
25af9023d4
@ -3623,6 +3623,18 @@ class App extends React.Component<AppProps, AppState> {
|
||||
if (this.state.multiElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.state.viewModeEnabled) {
|
||||
if (this.state.activeTool.type === "laser") {
|
||||
this.setActiveTool({ type: "selection" });
|
||||
setCursor(this.interactiveCanvas, CURSOR_TYPE.GRAB);
|
||||
} else {
|
||||
this.setActiveTool({ type: "laser" });
|
||||
setCursor(this.interactiveCanvas, CURSOR_TYPE.CROSSHAIR);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// we should only be able to double click when mode is selection
|
||||
if (this.state.activeTool.type !== "selection") {
|
||||
return;
|
||||
|
@ -155,9 +155,7 @@ const InteractiveCanvas = (props: InteractiveCanvasProps) => {
|
||||
onPointerCancel={props.onPointerCancel}
|
||||
onTouchMove={props.onTouchMove}
|
||||
onPointerDown={props.onPointerDown}
|
||||
onDoubleClick={
|
||||
props.appState.viewModeEnabled ? undefined : props.onDoubleClick
|
||||
}
|
||||
onDoubleClick={props.onDoubleClick}
|
||||
>
|
||||
{t("labels.drawingCanvas")}
|
||||
</canvas>
|
||||
|
Loading…
x
Reference in New Issue
Block a user