Browse Source

Fixed error disabled scroll zoom

pull/3472/head
Vladyslav_Prykhodko 6 years ago
parent
commit
5e109228eb
  1. 11
      ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts

11
ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts

@ -86,8 +86,7 @@ export default abstract class LeafletMap {
public initSettings(options: MapSettings) { public initSettings(options: MapSettings) {
this.options.tinyColor = tinycolor(this.options.color || defaultSettings.color); this.options.tinyColor = tinycolor(this.options.color || defaultSettings.color);
const { disableScrollZooming, const { useClusterMarkers,
useClusterMarkers,
zoomOnClick, zoomOnClick,
showCoverageOnHover, showCoverageOnHover,
removeOutsideVisibleBounds, removeOutsideVisibleBounds,
@ -95,9 +94,6 @@ export default abstract class LeafletMap {
chunkedLoading, chunkedLoading,
maxClusterRadius, maxClusterRadius,
maxZoom }: MapSettings = options; maxZoom }: MapSettings = options;
if (disableScrollZooming) {
this.map.scrollWheelZoom.disable();
}
if (useClusterMarkers) { if (useClusterMarkers) {
const clusteringSettings: MarkerClusterGroupOptions = { const clusteringSettings: MarkerClusterGroupOptions = {
zoomToBoundsOnClick: zoomOnClick, zoomToBoundsOnClick: zoomOnClick,
@ -307,8 +303,11 @@ export default abstract class LeafletMap {
} else { } else {
this.bounds = new L.LatLngBounds(null, null); this.bounds = new L.LatLngBounds(null, null);
} }
if (this.options.disableScrollZooming) {
this.map.scrollWheelZoom.disable();
}
if (this.options.draggableMarker) { if (this.options.draggableMarker) {
this.addMarkerControl(); this.addMarkerControl();
} }
if (this.options.editablePolygon) { if (this.options.editablePolygon) {
this.addPolygonControl(); this.addPolygonControl();

Loading…
Cancel
Save