[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 22 13:48:56 UTC 2019


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

New commits:
commit 8f14c4104eb163dd77365e079bd153c4aa1fc1e9
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Nov 22 15:36:59 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Nov 22 15:48:07 2019 +0200

    Avoid the ugly gap between the toolbar and ruler in the iOS app
    
    This is one of those "try different changes until you come up with
    something that seems to have the desired effect" type of commits. If
    somebody actually understands what is going on and knows the right way
    to fix the problem, feel free.
    
    Change-Id: I4aa2a6b3ca14d0d5fc7e329daf8850cd0ca524cb

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 7f3713bc1..0d5455d83 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -189,6 +189,15 @@ L.Map = L.Evented.extend({
 			if (((window.ThisIsTheiOSApp && window.mode.isTablet()) || !L.Browser.mobile) && this._docLayer._docType == 'text') {
 				var interactiveRuler = this._permission === 'edit' ? true : false;
 				L.control.ruler({position:'topleft', interactive:interactiveRuler}).addTo(this);
+
+				// For some unclear reason there would be a 20px gap between the
+				// toolbar and the ruler in the iOS app on iPad. This is a very ugly
+				// workaround for that. Don't ask me why something called
+				// ".leaflet-top" in practice seems to have impact only on where the
+				// ruler is located.
+				if (window.ThisIsTheiOSApp) {
+					$('.leaflet-top').css('top', '-20px');
+				}
 			}
 		});
 		this.on('updatetoolbarcommandvalues', function(e) {


More information about the Libreoffice-commits mailing list