@artstesh/maps 4.1.25 → 4.1.26

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.
@@ -27,6 +27,7 @@ import View from 'ol/View';
27
27
  import Overlay from 'ol/Overlay';
28
28
  import Style from 'ol/style/Style';
29
29
  import { Icon, Circle, Fill, Stroke, Text } from 'ol/style';
30
+ export { Style } from 'ol/style';
30
31
  import { METERS_PER_UNIT } from 'ol/proj/epsg4326';
31
32
 
32
33
  class DestructibleComponent {
@@ -387,15 +388,17 @@ class ModifyFeatureCommand extends PostboyCallbackMessage {
387
388
  /**
388
389
  * Constructs an instance of the class.
389
390
  *
390
- * @param {PolygonModel} model - The polygon model to be used.
391
- * @param {Style} style - The style configuration for the polygon.
392
- * @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The output format of the features. Default is GeoJson.
391
+ * @param {PolygonModel} model - The model representing the polygon data.
392
+ * @param {Style} style - The style to be applied to the polygon.
393
+ * @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The output format of the feature, defaults to GeoJson.
394
+ * @param {boolean} [draggable=true] - Determines whether the polygon is draggable, defaults to true.
393
395
  */
394
- constructor(model, style, format = FeatureOutputFormat.GeoJson) {
396
+ constructor(model, style, format = FeatureOutputFormat.GeoJson, draggable = true) {
395
397
  super();
396
398
  this.model = model;
397
399
  this.style = style;
398
400
  this.format = format;
401
+ this.draggable = draggable;
399
402
  }
400
403
  }
401
404
  ModifyFeatureCommand.ID = '8f76507e-f18d-4232-bab7-f3d4e3d707bb';
@@ -1228,7 +1231,8 @@ class FeatureModificationService {
1228
1231
  this.observeCancelation(ev, l);
1229
1232
  this.initFeature(l, ev.model.feature);
1230
1233
  this.addModify(ev);
1231
- this.addDragging(ev);
1234
+ if (ev.draggable)
1235
+ this.addDragging(ev);
1232
1236
  });
1233
1237
  });
1234
1238
  }