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) {
|
if (this.state.multiElement) {
|
||||||
return;
|
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
|
// we should only be able to double click when mode is selection
|
||||||
if (this.state.activeTool.type !== "selection") {
|
if (this.state.activeTool.type !== "selection") {
|
||||||
return;
|
return;
|
||||||
|
@ -155,9 +155,7 @@ const InteractiveCanvas = (props: InteractiveCanvasProps) => {
|
|||||||
onPointerCancel={props.onPointerCancel}
|
onPointerCancel={props.onPointerCancel}
|
||||||
onTouchMove={props.onTouchMove}
|
onTouchMove={props.onTouchMove}
|
||||||
onPointerDown={props.onPointerDown}
|
onPointerDown={props.onPointerDown}
|
||||||
onDoubleClick={
|
onDoubleClick={props.onDoubleClick}
|
||||||
props.appState.viewModeEnabled ? undefined : props.onDoubleClick
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{t("labels.drawingCanvas")}
|
{t("labels.drawingCanvas")}
|
||||||
</canvas>
|
</canvas>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user