summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-07-20 00:29:42 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-28 07:31:11 -0700
commit23c56b3c314ef5601e4ba7670ddd2285cb44c303 (patch)
treeec2d9beabd61dcba9fdeee61c15b9285b2ca575c /mobile-widgets
parent3e3b4baee27a437a613ccdb7f9e5bb5c34879b7c (diff)
downloadsubsurface-23c56b3c314ef5601e4ba7670ddd2285cb44c303.tar.gz
mapwidget.qml: add deselectMapLocation()
When called this function will zoom-out the map and set it's center to (0, 0) Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/MapWidget.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml
index 99cb7bf48..2d6319dd6 100644
--- a/mobile-widgets/qml/MapWidget.qml
+++ b/mobile-widgets/qml/MapWidget.qml
@@ -95,8 +95,13 @@ Item {
function centerOnMapLocation(mapLocation) {
zoomLevel = defaultZoomOut
- animateMapTo(mapLocation.coordinate, defaultZoomIn);
+ animateMapTo(mapLocation.coordinate, defaultZoomIn)
mapHelper.model.selectedUuid = mapLocation.uuid
}
+
+ function deselectMapLocation() {
+ mapHelper.model.selectedUuid = 0
+ animateMapTo(defaultCenter, defaultZoomOut)
+ }
}
}