summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2019-12-07 19:36:45 +0000
committerMichael Meeks <michael.meeks@collabora.com>2019-12-07 19:41:51 +0000
commit9afbe35d0d30bbb20d1c2ed62af026d692301194 (patch)
tree551040319d3adea8b82e8a94c1e10885ddf15ae6
parent3ecc73d37ff5d57050ccb6f29028a7a3c51a8fcc (diff)
zoom: while we are in a zoom animation use the target zoom.
Avoid race-condition scaling twips co-ordinates during a zoom to a level that fails to match the core's understanding. Fixes a race with other view's cursor positioning being reported fast in new view twips, before the animation completes to that zoom. Also fixes a writer zoom issue whereby you could get tiles at multiple different zoom levels overlayed for parts of the screen when using scroll-wheel zoom and panning fast. Change-Id: I865920aa13715b852e14ab23f96781e076096808
-rw-r--r--loleaflet/src/map/Map.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 9554e3386..908e1f1fc 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -706,7 +706,10 @@ L.Map = L.Evented.extend({
},
getZoom: function () {
- return this._zoom;
+ if (this._animatingZoom) // use animation target zoom
+ return this._animateToZoom;
+ else
+ return this._zoom;
},
getBounds: function () {