loleaflet/src/control/Control.Scroll.js | 2 +- loleaflet/src/layer/tile/GridLayer.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit c7588f0e8c194539e65fb8858fae02522237170a Author: Pranav Kant <pran...@collabora.com> Date: Tue May 3 16:44:51 2016 +0530 loleaflet: Don't ignore scroll on update size, bccu#1739 This leads to row/column offsets because the document view would ignore the scroll but row/col header would be scrolled. Change-Id: Ieec25429dbf698e710ce1f9765c51756f2a75032 diff --git a/loleaflet/src/control/Control.Scroll.js b/loleaflet/src/control/Control.Scroll.js index f251ca4..1ce203f 100644 --- a/loleaflet/src/control/Control.Scroll.js +++ b/loleaflet/src/control/Control.Scroll.js @@ -114,9 +114,9 @@ L.Control.Scroll = L.Control.extend({ _onUpdateSize: function (e) { this._ignoreScroll = true; - setTimeout(L.bind(function() {this._ignoreScroll = null;}, this), 200); L.DomUtil.setStyle(this._mockDoc, 'width', e.x + 'px'); L.DomUtil.setStyle(this._mockDoc, 'height', e.y + 'px'); + this._ignoreScroll = null; }, _onUpdateScrollOffset: function (e) { commit 2ffff6a3cc2c6318a75dacd80c976b0a9319b34a Author: Pranav Kant <pran...@collabora.com> Date: Tue May 3 16:41:24 2016 +0530 loleaflet: Fix MaxBounds for the map, bccu#1739 In case of spreadsheets, zooming in and then switching the sheet to a new one will leave the new sheet in a situation where panning would not be possible. This is because of incorrect maximum bounds set on the map. Further, this often leads to row/col offsets in spreadsheets because document view is bound under these MaxBounds but row/col are not. Change-Id: I468d2fee5424e11c93a0a707fde96e687061fb89 diff --git a/loleaflet/src/layer/tile/GridLayer.js b/loleaflet/src/layer/tile/GridLayer.js index c9cfb48..20dd36a 100644 --- a/loleaflet/src/layer/tile/GridLayer.js +++ b/loleaflet/src/layer/tile/GridLayer.js @@ -370,10 +370,11 @@ L.GridLayer = L.Layer.extend({ this._docHeightTwips / this.options.tileHeightTwips); docPixelLimits = docPixelLimits.multiplyBy(this._tileSize); + var scale = this._map.getZoomScale(this._map.getZoom(), 10); var topLeft = new L.Point(0, 0); - topLeft = this._map.unproject(topLeft); + topLeft = this._map.unproject(topLeft.multiplyBy(scale)); var bottomRight = new L.Point(docPixelLimits.x, docPixelLimits.y); - bottomRight = this._map.unproject(bottomRight); + bottomRight = this._map.unproject(bottomRight.multiplyBy(scale)); if (this._documentInfo === '' || sizeChanged) { // we just got the first status so we need to center the document _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits