@s-ui/sui-map-google
Advanced tools
Comparing version 1.7.0 to 1.8.0
# CHANGELOG | ||
# 1.8.0 (2023-08-31) | ||
### Features | ||
* **components/map/google/demo:** Solve lint issues ([7ad2b63](https://github.com/SUI-Components/adevinta-spain-components/commit/7ad2b631448c4967523e4e802e717105f29357fd)) | ||
* **components/map/google:** Clean listeners for every useEffect execution ([f625573](https://github.com/SUI-Components/adevinta-spain-components/commit/f625573492d5e3fedf3bad3d97812941faca6a93)) | ||
* **components/map/google:** Delete zoomControl from map_iteration_options in GoogleMapsDrawer ([b27c324](https://github.com/SUI-Components/adevinta-spain-components/commit/b27c324df1a1f914f825329b08e3ff954e39046e)) | ||
# 1.7.0 (2023-04-05) | ||
@@ -4,0 +15,0 @@ |
@@ -22,2 +22,5 @@ /* eslint-disable no-undef */ | ||
} | ||
return function () { | ||
return clearListeners(); | ||
}; | ||
}, [drawing]); // eslint-disable-line react-hooks/exhaustive-deps | ||
@@ -32,5 +35,6 @@ | ||
var clearListeners = function clearListeners() { | ||
mapsLibrary.event.clearListeners(mapRef, 'mousedown'); | ||
mapsLibrary.event.clearListeners(mapRef, 'mousemove'); | ||
mapsLibrary.event.clearListeners(mapRef, 'mousedown'); | ||
mapsLibrary.event.clearListeners(mapRef, 'mouseup'); | ||
mapsLibrary.event.clearListeners(mapRef, 'touchmove'); | ||
}; | ||
@@ -61,3 +65,2 @@ | ||
polyline.setMap(null); | ||
clearListeners(); | ||
mapRef.setOptions(ENABLED_MAP_INTERACTION_OPTIONS); | ||
@@ -64,0 +67,0 @@ onStopDrawing({ |
export var DISABLED_MAP_INTERACTION_OPTIONS = { | ||
disableDoubleClickZoom: false, | ||
draggable: false, | ||
scrollwheel: false, | ||
zoomControl: false | ||
scrollwheel: false | ||
}; | ||
@@ -10,4 +9,3 @@ export var ENABLED_MAP_INTERACTION_OPTIONS = { | ||
draggable: true, | ||
scrollwheel: true, | ||
zoomControl: true | ||
scrollwheel: true | ||
}; |
{ | ||
"name": "@s-ui/sui-map-google", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
20483
295