@artstesh/maps 5.1.23 → 5.2.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.
@@ -665,6 +665,17 @@ class GetFeaturesInPointQuery extends PostboyCallbackMessage {
665
665
  }
666
666
  }
667
667
 
668
+ class FitToFeaturesCommand extends PostboyGenericMessage {
669
+ features;
670
+ zoomAfter;
671
+ static ID = '04d67609-0b4c-4f52-aa53-ad0a3db967dc';
672
+ constructor(features, zoomAfter = 0) {
673
+ super();
674
+ this.features = features;
675
+ this.zoomAfter = zoomAfter;
676
+ }
677
+ }
678
+
668
679
  class AddLayerCommand extends PostboyGenericMessage {
669
680
  layer;
670
681
  static ID = '7fe68d71-350f-47e2-b1ae-62cc333e1572';
@@ -712,17 +723,6 @@ class RemoveTileCommand extends PostboyGenericMessage {
712
723
  }
713
724
  }
714
725
 
715
- class FitToFeaturesCommand extends PostboyGenericMessage {
716
- features;
717
- zoomAfter;
718
- static ID = '04d67609-0b4c-4f52-aa53-ad0a3db967dc';
719
- constructor(features, zoomAfter = 0) {
720
- super();
721
- this.features = features;
722
- this.zoomAfter = zoomAfter;
723
- }
724
- }
725
-
726
726
  class GetLayerQuery extends PostboyCallbackMessage {
727
727
  name;
728
728
  static ID = 'd2683490-2aa2-4dee-855d-f752ce4d3be5';
@@ -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: "16.2.12", ngImport: i0, type: MapPostboyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
829
824
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", 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: "16.2.12", ngImport: i0, type: DrawingService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -2791,5 +2788,5 @@ class StringifyFeatureHelper {
2791
2788
  * Generated bundle index. Do not edit.
2792
2789
  */
2793
2790
 
2794
- export { AddControlCommand, CalculateAreaExecutor, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, FilterFeaturesInAreaExecutor, FilterFeaturesInPointExecutor, FitToPolygonsCommand, GetFeaturesInAreaQuery, GetFeaturesInPointQuery, GetMapPositionExecutor, MapClickEvent, MapConstants, MapControl, MapControlZoomComponent, MapLyrs, MapLyrsLabel, MapModule, MapMoveEndEvent, MapPlateComponent, MapPostboyService, MapRenderedEvent, MapSettings, MarkerModel, MarkerStyleHelper, MarkersComponent, MessageRegistratorService, ModifyFeatureCommand, OsmTileLayerComponent, PolygonModel, PolygonStyleHelper, PolygonsComponent, RemoveControlCommand, SetMapCenterCommand, StartDrawingCommand, StringifyFeatureHelper, TextStyleHelper, TileLayerComponent, TileLayerSettings, TooltipComponent, TooltipSettings, ZoomControlSettings };
2791
+ export { AddControlCommand, CalculateAreaExecutor, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, FilterFeaturesInAreaExecutor, FilterFeaturesInPointExecutor, FitToFeaturesCommand, FitToPolygonsCommand, GetFeaturesInAreaQuery, GetFeaturesInPointQuery, GetMapPositionExecutor, MapClickEvent, MapConstants, MapControl, MapControlZoomComponent, MapLyrs, MapLyrsLabel, MapModule, MapMoveEndEvent, MapPlateComponent, MapPostboyService, MapRenderedEvent, MapSettings, MarkerModel, MarkerStyleHelper, MarkersComponent, MessageRegistratorService, ModifyFeatureCommand, OsmTileLayerComponent, PolygonModel, PolygonStyleHelper, PolygonsComponent, RemoveControlCommand, SetMapCenterCommand, StartDrawingCommand, StringifyFeatureHelper, TextStyleHelper, TileLayerComponent, TileLayerSettings, TooltipComponent, TooltipSettings, ZoomControlSettings };
2795
2792
  //# sourceMappingURL=maps-components.mjs.map