@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 {
@@ -388,15 +389,17 @@ class ModifyFeatureCommand extends PostboyCallbackMessage {
388
389
  /**
389
390
  * Constructs an instance of the class.
390
391
  *
391
- * @param {PolygonModel} model - The polygon model to be used.
392
- * @param {Style} style - The style configuration for the polygon.
393
- * @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The output format of the features. Default is GeoJson.
392
+ * @param {PolygonModel} model - The model representing the polygon data.
393
+ * @param {Style} style - The style to be applied to the polygon.
394
+ * @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The output format of the feature, defaults to GeoJson.
395
+ * @param {boolean} [draggable=true] - Determines whether the polygon is draggable, defaults to true.
394
396
  */
395
- constructor(model, style, format = FeatureOutputFormat.GeoJson) {
397
+ constructor(model, style, format = FeatureOutputFormat.GeoJson, draggable = true) {
396
398
  super();
397
399
  this.model = model;
398
400
  this.style = style;
399
401
  this.format = format;
402
+ this.draggable = draggable;
400
403
  }
401
404
  }
402
405
  ModifyFeatureCommand.ID = '8f76507e-f18d-4232-bab7-f3d4e3d707bb';
@@ -1238,7 +1241,8 @@ class FeatureModificationService {
1238
1241
  this.observeCancelation(ev, l);
1239
1242
  this.initFeature(l, ev.model.feature);
1240
1243
  this.addModify(ev);
1241
- this.addDragging(ev);
1244
+ if (ev.draggable)
1245
+ this.addDragging(ev);
1242
1246
  });
1243
1247
  });
1244
1248
  }