changed logic to match regression tests
This commit is contained in:
parent
6ef88eb851
commit
c79bb5ed6a
@ -4881,6 +4881,11 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
this.state.penMode &&
|
||||||
|
this.lastPointerDownEvent?.pointerType === "touch" &&
|
||||||
|
this.state.activeTool.type !== "selection"
|
||||||
|
) {
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
if (now - this.debounceDoubleClickTimestamp < 200) {
|
if (now - this.debounceDoubleClickTimestamp < 200) {
|
||||||
//handleCanvasDoubleClick click fires twice in case of touch.
|
//handleCanvasDoubleClick click fires twice in case of touch.
|
||||||
@ -4888,12 +4893,6 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.debounceDoubleClickTimestamp = now;
|
this.debounceDoubleClickTimestamp = now;
|
||||||
|
|
||||||
if (
|
|
||||||
this.state.penMode &&
|
|
||||||
this.lastPointerDownEvent?.pointerType === "touch" &&
|
|
||||||
this.state.activeTool.type !== "selection"
|
|
||||||
) {
|
|
||||||
this.updateScene(actionToggleEraserTool.perform([] as any, this.state));
|
this.updateScene(actionToggleEraserTool.perform([] as any, this.state));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user