mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-30 14:36:35 +08:00
fix(editor): 画布拖动容易误触
This commit is contained in:
parent
edbb5521b3
commit
541a279fe7
@ -155,12 +155,14 @@ export class ScrollViewer {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopImmediatePropagation();
|
event.stopImmediatePropagation();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
} else if (this.keydown) return;
|
}
|
||||||
|
|
||||||
|
if (event.code !== Keys.ESCAPE || !this.enter || this.keydown) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.keydown = true;
|
this.keydown = true;
|
||||||
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
this.target.style.cursor = 'grab';
|
this.target.style.cursor = 'grab';
|
||||||
this.container.addEventListener('mousedown', this.mousedownHandler);
|
this.container.addEventListener('mousedown', this.mousedownHandler);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user