loleaflet/src/map/Map.js |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit dfd22ba35c00160f00292d6aa0e156d786111d48
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Wed Mar 13 18:05:14 2019 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Tue Apr 23 11:59:45 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/71117
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Tested-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 01da473b6..1c3e00096 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
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to