fix(editor): 画布拖动容易误触

This commit is contained in:
roymondchen 2022-03-17 23:10:43 +08:00 committed by jia000
parent edbb5521b3
commit 541a279fe7

View File

@ -155,12 +155,14 @@ export class ScrollViewer {
event.preventDefault();
event.stopImmediatePropagation();
event.stopPropagation();
} else if (this.keydown) return;
}
if (event.code !== Keys.ESCAPE || !this.enter || this.keydown) {
return;
}
this.keydown = true;
event.preventDefault();
this.target.style.cursor = 'grab';
this.container.addEventListener('mousedown', this.mousedownHandler);
};