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

Loading…
Cancel
Save