mapwidget.qml: move the new map type toggle on top of the map

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-07-20 05:24:18 +03:00 committed by Dirk Hohndel
parent 09a0f74bd8
commit b0cf820bef

View file

@ -112,28 +112,28 @@ Item {
mapHelper.model.selectedUuid = 0
animateMapZoomOut()
}
}
Image {
id: toggleImage
x: 10; y: x
source: "qrc:///mapwidget-toggle-" + (map.activeMapType === map.mapType.SATELLITE ? "street" : "satellite")
Image {
id: toggleImage
x: 10; y: x
source: "qrc:///mapwidget-toggle-" + (map.activeMapType === map.mapType.SATELLITE ? "street" : "satellite")
SequentialAnimation {
id: toggleImageAnimation
PropertyAnimation {
target: toggleImage; property: "scale"; from: 1.0; to: 0.8; duration: 120;
}
PropertyAnimation {
target: toggleImage; property: "scale"; from: 0.8; to: 1.0; duration: 80;
}
SequentialAnimation {
id: toggleImageAnimation
PropertyAnimation {
target: toggleImage; property: "scale"; from: 1.0; to: 0.8; duration: 120;
}
PropertyAnimation {
target: toggleImage; property: "scale"; from: 0.8; to: 1.0; duration: 80;
}
}
MouseArea {
anchors.fill: parent
onClicked: {
map.activeMapType = map.activeMapType === map.mapType.SATELLITE ? map.mapType.STREET : map.mapType.SATELLITE
toggleImageAnimation.restart()
}
MouseArea {
anchors.fill: parent
onClicked: {
map.activeMapType = map.activeMapType === map.mapType.SATELLITE ? map.mapType.STREET : map.mapType.SATELLITE
toggleImageAnimation.restart()
}
}
}