fix: 修复快速点选拖动时有残影的问题

This commit is contained in:
parisma 2022-04-07 18:41:50 +08:00 committed by jia000
parent 2e12812aac
commit a52d25fb70

View File

@ -83,6 +83,10 @@ export default class StageCore extends EventEmitter {
})
.on('highlight', async (event: MouseEvent) => {
await this.setElementFromPoint(event);
if (this.highlightedDom === this.selectedDom) {
this.highlightLayer.clearHighlight();
return;
}
this.highlightLayer.highlight(this.highlightedDom as HTMLElement);
this.emit('highlight', this.highlightedDom);
})