mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
This reverts commit 56034eacb0
.
This commit is contained in:
parent
c67b0c59c2
commit
79557676c2
1 changed files with 0 additions and 24 deletions
|
@ -121,7 +121,6 @@ function withBatchedUpdates<
|
|||
|
||||
const { history } = createHistory();
|
||||
|
||||
let didTapTwice: boolean = false;
|
||||
let cursorX = 0;
|
||||
let cursorY = 0;
|
||||
let isHoldingSpace: boolean = false;
|
||||
|
@ -370,7 +369,6 @@ export class App extends React.Component<any, AppState> {
|
|||
document.addEventListener("copy", this.onCopy);
|
||||
document.addEventListener("paste", this.pasteFromClipboard);
|
||||
document.addEventListener("cut", this.onCut);
|
||||
window.addEventListener("touchstart", this.onTapStart);
|
||||
|
||||
document.addEventListener("keydown", this.onKeyDown, false);
|
||||
document.addEventListener("keyup", this.onKeyUp, { passive: true });
|
||||
|
@ -404,7 +402,6 @@ export class App extends React.Component<any, AppState> {
|
|||
|
||||
document.removeEventListener("copy", this.onCopy);
|
||||
document.removeEventListener("paste", this.pasteFromClipboard);
|
||||
window.removeEventListener("touchstart", this.onTapStart);
|
||||
document.removeEventListener("cut", this.onCut);
|
||||
|
||||
document.removeEventListener("keydown", this.onKeyDown, false);
|
||||
|
@ -557,27 +554,6 @@ export class App extends React.Component<any, AppState> {
|
|||
);
|
||||
};
|
||||
|
||||
private onTapStart = (event: TouchEvent) => {
|
||||
let timeoutId;
|
||||
if (!didTapTwice) {
|
||||
didTapTwice = true;
|
||||
timeoutId = setTimeout(function () {
|
||||
didTapTwice = false;
|
||||
}, 300);
|
||||
return false;
|
||||
}
|
||||
if (didTapTwice) {
|
||||
const [touch] = event.touches;
|
||||
// @ts-ignore
|
||||
this.handleCanvasDoubleClick({
|
||||
clientX: touch.clientX,
|
||||
clientY: touch.clientY,
|
||||
});
|
||||
clearTimeout(timeoutId);
|
||||
}
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
private pasteFromClipboard = withBatchedUpdates(
|
||||
async (event: ClipboardEvent | null) => {
|
||||
// #686
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue