diff --git a/src/dom/DomUtil.js b/src/dom/DomUtil.js index fa32c58d..93c52710 100644 --- a/src/dom/DomUtil.js +++ b/src/dom/DomUtil.js @@ -134,6 +134,7 @@ L.DomUtil = { // on WebKit browsers, using translate3d instead of translate makes animation smoother // as it ensures HW accel is used. Firefox doesn't care (same speed either way). var is3d = L.Browser.webkit3d; + point = point || new L.Point(0, 0); return 'translate' + (is3d ? '3d(' : '(') + point.x + 'px,' + diff --git a/src/layer/tile/GridLayer.js b/src/layer/tile/GridLayer.js index 69419b67..26d26621 100644 --- a/src/layer/tile/GridLayer.js +++ b/src/layer/tile/GridLayer.js @@ -498,7 +498,7 @@ L.GridLayer = L.Layer.extend({ if (map && !map._animatingZoom && !map.touchZoom._zooming) { this._bgBuffer.innerHTML = ''; - this._bgBuffer.style[L.DomUtil.TRANSFORM] = ''; + this._bgBuffer.style[L.DomUtil.TRANSFORM] = L.DomUtil.getTranslateString(); } }, @@ -514,7 +514,7 @@ L.GridLayer = L.Layer.extend({ // prepare the buffer to become the front tile pane bg.style.visibility = 'hidden'; - bg.style[L.DomUtil.TRANSFORM] = ''; + bg.style[L.DomUtil.TRANSFORM] = L.DomUtil.getTranslateString(); // switch out the current layer to be the new bg layer (and vice-versa) this._tileContainer = bg;