From 72a70483bb761d05700c680c003f2b143fa98c1c Mon Sep 17 00:00:00 2001 From: Cmen <1176967590@qq.com> Date: Tue, 8 Mar 2022 08:44:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=BA=E5=88=B6=E5=AE=8C=E6=88=90=E7=BC=96?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/map/MapEditor.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/map/MapEditor.ts b/src/map/MapEditor.ts index 6febddd..3a52160 100644 --- a/src/map/MapEditor.ts +++ b/src/map/MapEditor.ts @@ -153,12 +153,14 @@ export class MapEditor extends Emitter implements IMapEditor { } createOverlay(type: OverlayTypes) { + this.finishEditOverlay(); this.currentOverlayEditor = this.getEditorByType(type!); this.currentOverlayEditor?.create(); this.editorStatus = "creating"; } selectOverlays(ids?: string[]) { + this.finishEditOverlay(); this.selectedIds?.forEach((id) => { const { target, type } = this.overlayMap[id]; target.setOptions(getOverlayOptions(type));