@artstesh/maps 6.1.4 → 6.1.5

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 {
@@ -402,19 +403,22 @@ class ModifyFeatureCommand extends PostboyCallbackMessage {
402
403
  model;
403
404
  style;
404
405
  format;
406
+ draggable;
405
407
  static ID = '8f76507e-f18d-4232-bab7-f3d4e3d707bb';
406
408
  /**
407
409
  * Constructs an instance of the class.
408
410
  *
409
- * @param {PolygonModel} model - The polygon model to be used.
410
- * @param {Style} style - The style configuration for the polygon.
411
- * @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The output format of the features. Default is GeoJson.
411
+ * @param {PolygonModel} model - The model representing the polygon data.
412
+ * @param {Style} style - The style to be applied to the polygon.
413
+ * @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The output format of the feature, defaults to GeoJson.
414
+ * @param {boolean} [draggable=true] - Determines whether the polygon is draggable, defaults to true.
412
415
  */
413
- constructor(model, style, format = FeatureOutputFormat.GeoJson) {
416
+ constructor(model, style, format = FeatureOutputFormat.GeoJson, draggable = true) {
414
417
  super();
415
418
  this.model = model;
416
419
  this.style = style;
417
420
  this.format = format;
421
+ this.draggable = draggable;
418
422
  }
419
423
  }
420
424
 
@@ -1298,7 +1302,8 @@ class FeatureModificationService {
1298
1302
  this.observeCancelation(ev, l);
1299
1303
  this.initFeature(l, ev.model.feature);
1300
1304
  this.addModify(ev);
1301
- this.addDragging(ev);
1305
+ if (ev.draggable)
1306
+ this.addDragging(ev);
1302
1307
  });
1303
1308
  });
1304
1309
  }