Showing
1 changed file
with
3 additions
and
3 deletions
... | ... | @@ -170,8 +170,8 @@ export default abstract class LeafletMap { |
170 | 170 | this.map.setZoom(this.options.defaultZoomLevel, { animate: false }); |
171 | 171 | this.map.panTo(bounds.getCenter(), { animate: false }); |
172 | 172 | } else { |
173 | - this.map.once('zoomend', function () { | |
174 | - if (!this.options.defaultZoomLevel && this.options.map.getZoom() > this.options.minZoomLevel) { | |
173 | + this.map.once('zoomend', () => { | |
174 | + if (!this.options.defaultZoomLevel && this.map.getZoom() > this.options.minZoomLevel) { | |
175 | 175 | this.map.setZoom(this.options.minZoomLevel, { animate: false }); |
176 | 176 | } |
177 | 177 | }); |
... | ... | @@ -323,4 +323,4 @@ export default abstract class LeafletMap { |
323 | 323 | this.polygons.get(key).updatePolygon(data, dataSources, settings); |
324 | 324 | }); |
325 | 325 | } |
326 | -} | |
\ No newline at end of file | ||
326 | +} | ... | ... |