loleaflet/src/map/Map.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit c05d8719395d0ffdaf84eca27cc24dc3e780e9ff Author: Szymon Kłos <[email protected]> AuthorDate: Wed Mar 13 18:05:14 2019 +0100 Commit: Jan Holesovsky <[email protected]> CommitDate: Tue Apr 23 12:07:35 2019 +0200 Show progressbar centered in the mobile When Online was embodied in the nextcloud app (Android) the progressbar was moved into top-left corner. During a loading all functions to get container or browser size were returning (0,0). This hack assumed that webview size is almost equal to the mobile screen size. Change-Id: I0fff53639a3baa88b57d91bf671e00ad8c71180d Reviewed-on: https://gerrit.libreoffice.org/69219 Reviewed-by: Jan Holesovsky <[email protected]> Tested-by: Jan Holesovsky <[email protected]> diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 6f213dd9d..4aad141c5 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -108,7 +108,14 @@ L.Map = L.Evented.extend({ } this._addLayers(this.options.layers); this._socket = L.socket(this); - this._progressBar = L.progressOverlay(this.getCenter(), L.point(150, 25)); + + var center = this.getCenter(); + if (L.Browser.mobile) { + var doubledProgressHeight = 200; + var size = new L.point(screen.width, screen.height - doubledProgressHeight); + center = this.layerPointToLatLng(size._divideBy(2)); + } + this._progressBar = L.progressOverlay(center, new L.point(150, 25)); if (L.Browser.mobile) { this._clipboardContainer = L.control.mobileInput().addTo(this); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
