mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
mapwidget.qml: make pan and zoom-in have the same duration
There was a problem with the current different duration for pan and zoom. Ideally the pan should before the zoom: Map zooms out -> pan to new center starts -> zoom in The problem with this is that if the map pans out too much it loses it's center and the above scheme would not work. To solve the problem, make the duration of pan and zoom the same this is not idea, but prevents the case where the map would not zoom-in at the correct center. Also remove the easing function. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
f39e900186
commit
1bc91bfb67
1 changed files with 2 additions and 2 deletions
|
@ -104,9 +104,9 @@ Item {
|
|||
target: map; property: "zoomLevel"; to: map.newZoomOut; duration: Math.abs(map.newZoomOut - map.zoomLevel) * 200
|
||||
}
|
||||
ParallelAnimation {
|
||||
CoordinateAnimation { target: map; property: "center"; to: map.newCenter; duration: 1000 }
|
||||
CoordinateAnimation { target: map; property: "center"; to: map.newCenter; duration: 2000; easing.type: Easing.OutCubic }
|
||||
NumberAnimation {
|
||||
target: map; property: "zoomLevel"; to: map.newZoom ; duration: 2000; easing.type: Easing.InCubic
|
||||
target: map; property: "zoomLevel"; to: map.newZoom; duration: 2000
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue