Commit 5e109228ebf0ddba89de6616ff91a48e9fc5670b

Authored by Vladyslav_Prykhodko
1 parent acc75592

Fixed error disabled scroll zoom

... ... @@ -86,8 +86,7 @@ export default abstract class LeafletMap {
86 86
87 87 public initSettings(options: MapSettings) {
88 88 this.options.tinyColor = tinycolor(this.options.color || defaultSettings.color);
89   - const { disableScrollZooming,
90   - useClusterMarkers,
  89 + const { useClusterMarkers,
91 90 zoomOnClick,
92 91 showCoverageOnHover,
93 92 removeOutsideVisibleBounds,
... ... @@ -95,9 +94,6 @@ export default abstract class LeafletMap {
95 94 chunkedLoading,
96 95 maxClusterRadius,
97 96 maxZoom }: MapSettings = options;
98   - if (disableScrollZooming) {
99   - this.map.scrollWheelZoom.disable();
100   - }
101 97 if (useClusterMarkers) {
102 98 const clusteringSettings: MarkerClusterGroupOptions = {
103 99 zoomToBoundsOnClick: zoomOnClick,
... ... @@ -307,8 +303,11 @@ export default abstract class LeafletMap {
307 303 } else {
308 304 this.bounds = new L.LatLngBounds(null, null);
309 305 }
  306 + if (this.options.disableScrollZooming) {
  307 + this.map.scrollWheelZoom.disable();
  308 + }
310 309 if (this.options.draggableMarker) {
311   - this.addMarkerControl();
  310 + this.addMarkerControl();
312 311 }
313 312 if (this.options.editablePolygon) {
314 313 this.addPolygonControl();
... ...