Commit 5e109228ebf0ddba89de6616ff91a48e9fc5670b

Authored by Vladyslav_Prykhodko
1 parent acc75592

Fixed error disabled scroll zoom

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