loleaflet/src/layer/tile/TileLayer.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
New commits: commit f496c1e9c588b382fbdb10ae90a0cd85390274e8 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Sat Mar 23 14:51:27 2019 +0100 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Tue Mar 26 14:41:15 2019 +0100 Make all pages accessible after zooming After zooming scrollbar was updated and scroll position was incorrect what caused first pages not accessible. Regression was introduced by: ffd7151443ee360c7764aaa77f9e7fe5f5d64eee Second problem was jumping to the cursor during zooming. Solution was to not update the cursors on zooming start. Change-Id: I0891799b03ed4eccb211ee43eb30e546317a90fc Reviewed-on: https://gerrit.libreoffice.org/69606 Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Tested-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 643a9ba06..f39102829 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -1593,14 +1593,12 @@ L.TileLayer = L.GridLayer.extend({ _onZoomStart: function () { this._isZooming = true; - this._onUpdateCursor(); - this.updateAllViewCursors(); }, _onZoomEnd: function () { this._isZooming = false; - this._onUpdateCursor(); + this._onUpdateCursor(null, true); this.updateAllViewCursors(); }, @@ -1624,16 +1622,16 @@ L.TileLayer = L.GridLayer.extend({ }, // Update cursor layer (blinking cursor). - _onUpdateCursor: function (scroll) { + _onUpdateCursor: function (scroll, zoom) { var cursorPos = this._visibleCursor.getNorthWest(); var docLayer = this._map._docLayer; - if ((scroll !== false) && !this._map.getBounds().contains(this._visibleCursor) && this._isCursorVisible) { + if ((!zoom && scroll !== false) && !this._map.getBounds().contains(this._visibleCursor) && this._isCursorVisible) { var center = this._map.project(cursorPos); center = center.subtract(this._map.getSize().divideBy(2)); center.x = Math.round(center.x < 0 ? 0 : center.x); center.y = Math.round(center.y < 0 ? 0 : center.y); - if (!(this._selectionHandles.start && this._selectionHandles.start.isDragged) && + if (!zoom && !(this._selectionHandles.start && this._selectionHandles.start.isDragged) && !(this._selectionHandles.end && this._selectionHandles.end.isDragged) && !(docLayer._followEditor || docLayer._followUser)) { if (window.ThisIsAMobileApp) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits