Browse Source

强制完成编辑

master
Cmen 3 years ago
parent
commit
72a70483bb
  1. 2
      src/map/MapEditor.ts

2
src/map/MapEditor.ts

@ -153,12 +153,14 @@ export class MapEditor extends Emitter implements IMapEditor {
} }
createOverlay(type: OverlayTypes) { createOverlay(type: OverlayTypes) {
this.finishEditOverlay();
this.currentOverlayEditor = this.getEditorByType(type!); this.currentOverlayEditor = this.getEditorByType(type!);
this.currentOverlayEditor?.create(); this.currentOverlayEditor?.create();
this.editorStatus = "creating"; this.editorStatus = "creating";
} }
selectOverlays(ids?: string[]) { selectOverlays(ids?: string[]) {
this.finishEditOverlay();
this.selectedIds?.forEach((id) => { this.selectedIds?.forEach((id) => {
const { target, type } = this.overlayMap[id]; const { target, type } = this.overlayMap[id];
target.setOptions(getOverlayOptions(type)); target.setOptions(getOverlayOptions(type));

Loading…
Cancel
Save