commit b10ab9b1e664d0afdaac1013f12ddd9f85f14bb7
parent 04c02781de12cda82739054f4b3d76ea6361ff93
Author: Sergej Orlov <wladimirych@gmail.com>
Date: Thu, 16 Feb 2017 10:44:01 +0300
disabled tiles loading while zooming (to speed up zoom on mobile)
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/lib/leaflet.fixes/index.js b/src/lib/leaflet.fixes/index.js
@@ -3,6 +3,7 @@ import L from 'leaflet';
function fixAll() {
fixPanAnimationBug();
fixTouchDetection();
+ disableGridLayerUpdateWhenZooming();
}
// https://github.com/Leaflet/Leaflet/issues/3575
@@ -25,4 +26,11 @@ function fixTouchDetection() {
L.Browser.touch &= (navigator.pointerEnabled || navigator.maxTouchPoints)
}
+function disableGridLayerUpdateWhenZooming() {
+ L.GridLayer.addInitHook(function() {
+ this.options.updateWhenZooming = false;
+ }
+ );
+}
+
export {fixAll}