@nextgis/ngw-leaflet 1.9.7 → 1.10.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.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-leaflet; version: 1.9.7; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 1.10.0; author: NextGIS */
2
2
  function styleInject(css, ref) {
3
3
  if ( ref === void 0 ) ref = {};
4
4
  var insertAt = ref.insertAt;
@@ -15777,7 +15777,7 @@ const OPTIONS$1 = {
15777
15777
  minZoom: 0,
15778
15778
  maxZoom: 20,
15779
15779
  paint: {
15780
- color: 'blue',
15780
+ color: '#0000ff',
15781
15781
  opacity: 0.4,
15782
15782
  strokeOpacity: 1,
15783
15783
  stroke: true,
@@ -15785,7 +15785,7 @@ const OPTIONS$1 = {
15785
15785
  weight: 1,
15786
15786
  },
15787
15787
  selectedPaint: {
15788
- color: 'darkblue',
15788
+ color: '#00008b',
15789
15789
  opacity: 0.4,
15790
15790
  strokeOpacity: 1,
15791
15791
  stroke: true,
@@ -16935,6 +16935,30 @@ class WebMapLayers extends WebMapMain {
16935
16935
  adapter.clearLayer(cb);
16936
16936
  }
16937
16937
  }
16938
+ setLayerPaint(layerDef, paint) {
16939
+ const layer = this.getLayer(layerDef);
16940
+ if (paint && layer && layer.setPaint) {
16941
+ layer.setPaint(paint);
16942
+ }
16943
+ }
16944
+ setLayerSelectedPaint(layerDef, paint) {
16945
+ const layer = this.getLayer(layerDef);
16946
+ if (paint && layer && layer.setSelectedPaint) {
16947
+ layer.setSelectedPaint(paint);
16948
+ }
16949
+ }
16950
+ updateLayerPaint(layerDef, paint) {
16951
+ const layer = this.getLayer(layerDef);
16952
+ if (paint && layer && layer.updatePaint) {
16953
+ layer.updatePaint(paint);
16954
+ }
16955
+ }
16956
+ updateLayerSelectedPaint(layerDef, paint) {
16957
+ const layer = this.getLayer(layerDef);
16958
+ if (paint && layer && layer.updateSelectedPaint) {
16959
+ layer.updateSelectedPaint(paint);
16960
+ }
16961
+ }
16938
16962
  getAttributions(options) {
16939
16963
  const attributions = [];
16940
16964
  for (const l in this._layers) {
@@ -21886,6 +21910,9 @@ function createControl(control, options = {}, map) {
21886
21910
  if (options.bar) {
21887
21911
  element.classList.add('leaflet-bar');
21888
21912
  }
21913
+ if (options.addClass) {
21914
+ element.classList.add(options.addClass);
21915
+ }
21889
21916
  if (!options.margin && !options.bar) {
21890
21917
  element.style.marginBottom = '0px';
21891
21918
  element.style.marginTop = '0px';
@@ -22363,7 +22390,7 @@ class GeoJsonAdapter extends BaseAdapter {
22363
22390
  async _openPopup(def, options = {}, type, latLng) {
22364
22391
  var _a, _b;
22365
22392
  const { feature, layer } = def;
22366
- const { minWidth, autoPan, maxWidth, closeButton: closeButton_ } = {
22393
+ const { minWidth, autoPan, maxWidth, closeButton: closeButton_, } = {
22367
22394
  minWidth: 300,
22368
22395
  ...options,
22369
22396
  };
@@ -22559,7 +22586,7 @@ class GeoJsonAdapter extends BaseAdapter {
22559
22586
  ok = this._filterFun(def);
22560
22587
  }
22561
22588
  if (ok) {
22562
- const { popup, popupOptions, selectable, interactive, selectOnHover, } = this.options;
22589
+ const { popup, popupOptions, selectable, interactive, selectOnHover } = this.options;
22563
22590
  // @ts-ignore
22564
22591
  layer.options.interactive = defined(interactive) ? interactive : true;
22565
22592
  layer_.addLayer(layer);