Showing
1 changed file
with
5 additions
and
6 deletions
... | ... | @@ -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(); | ... | ... |