Skip to content
Snippets Groups Projects
Commit 2d127437 authored by Sara Savanovic Djordjevic's avatar Sara Savanovic Djordjevic
Browse files

update: minor fix of zoom behavior

parent b61033d0
No related branches found
No related tags found
1 merge request!19Clhp map, license agreement
......@@ -38,9 +38,11 @@ class ChoroplethMapState extends State<ChoroplethMap> {
_initDataSource();
}
/// Resets the map zoom level
void resetZoom() {
setState(() {
_zoomPanBehavior.zoomLevel = 1;
_choroplethMapKey.currentState?.resetZoom();
});
}
......
......@@ -77,13 +77,6 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
});
}
/// Reset the map zoom and centering
void resetZoom() {
setState(() {
_choroplethMapKey.currentState?.resetZoom();
});
}
@override
Widget build(BuildContext context) {
// Initialise selectedMarker to first element in markerList
......@@ -248,8 +241,8 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
onTapUp: (_) {
setState(() {
centerMap = false;
_choroplethMapKey.currentState?.resetZoom();
});
resetZoom(); // Reset the map zoom
},
onTapCancel: () {
setState(() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment