diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-07-20 00:16:09 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-28 07:31:11 -0700 |
commit | 033eec9500975f1482b03b8706359d733482beec (patch) | |
tree | 46bdf105a8811d8a57b6b1044c6477ede0f439a3 /mobile-widgets | |
parent | 6299a3c93bb38d555f7db43a3b880c1cc6e89327 (diff) | |
download | subsurface-033eec9500975f1482b03b8706359d733482beec.tar.gz |
mapwidget.qml: use map.newZoom and map.defaultZoomIn
When centering on a map location, use the predefined zoom
map.defaultZoomIn.
Later the map should be able to center on (0, 0) and zoom-out
if a dive doesn't have GPS data.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qml/MapWidget.qml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml index 28754e0de..17b93c773 100644 --- a/mobile-widgets/qml/MapWidget.qml +++ b/mobile-widgets/qml/MapWidget.qml @@ -80,7 +80,7 @@ Item { NumberAnimation { target: map property: "zoomLevel" - to: 17 + to: map.newZoom duration: 3000 easing.type: Easing.InCubic } @@ -89,6 +89,7 @@ Item { function centerOnMapLocation(mapLocation) { map.newCenter = mapLocation.coordinate map.zoomLevel = 2 + map.newZoom = map.defaultZoomIn mapAnimation.restart() mapHelper.model.selectedUuid = mapLocation.uuid } |