@artstesh/maps 6.0.15 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -819,11 +819,6 @@ class ZoomControlFactory {
819
819
  class MapPostboyService extends PostboyService {
820
820
  constructor() {
821
821
  super();
822
- this.addLocker({
823
- locker: StartDrawingCommand.ID,
824
- unlocker: DrawingFinishedEvent.ID,
825
- locking: [MapClickEvent.ID],
826
- });
827
822
  }
828
823
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: MapPostboyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
829
824
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: MapPostboyService });
@@ -1092,6 +1087,7 @@ class DrawingService {
1092
1087
  }
1093
1088
  observeSelectArea() {
1094
1089
  this.postboy.sub(DrawSelectionAreaCommand).subscribe((ev) => {
1090
+ this.postboy.lock(MapClickEvent);
1095
1091
  this.postboy.fireCallback(new StartDrawingCommand(ev.type, ev.style), (r) => {
1096
1092
  if (!r) {
1097
1093
  ev.finish(new Dictionary());
@@ -1147,6 +1143,7 @@ class DrawingService {
1147
1143
  this.map?.removeInteraction(this.drawInteraction);
1148
1144
  layer?.setSource(new Vector({}));
1149
1145
  }
1146
+ this.postboy.unlock(MapClickEvent);
1150
1147
  setTimeout(() => this.postboy.fire(new DrawingFinishedEvent()), 300);
1151
1148
  }
1152
1149
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: DrawingService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });