[Libreoffice-commits] online.git: 2 commits - loleaflet/css loleaflet/src

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Sun Dec 8 21:39:31 UTC 2019


 loleaflet/css/loleaflet.css                |    2 +-
 loleaflet/src/control/Control.LokDialog.js |   17 ++++++++---------
 2 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 333a49b6f242e96365780270113bb99653b11b39
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Dec 8 11:20:19 2019 -0500
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Sun Dec 8 22:39:24 2019 +0100

    leaflet: no need to setup events on updates
    
    Change-Id: Ie34907230377b6d0f2e0729403b435028aac16ae
    Reviewed-on: https://gerrit.libreoffice.org/84714
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index f753965c1..18efb9de4 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -655,9 +655,8 @@ L.Control.LokDialog = L.Control.extend({
 			else
 				$(panel).parent().hide();
 
-			var panelContainer = document.getElementById(strId);
-			var panelCanvas = document.getElementById(strId + '-canvas');
-			this._postLaunch(id, panelContainer, panelCanvas);
+			// Render window.
+			this._sendPaintWindowRect(id);
 		} else {
 			this._createSidebar(id, strId, width, height);
 		}
commit d1da3ac1a22f1bd8724484e1559fdf5972ab5a65
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Fri Dec 6 06:50:55 2019 -0500
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Sun Dec 8 22:39:13 2019 +0100

    leaflet: sidebar scrolling improvements
    
    The browser has to move the sidebar to accomodate
    scrolling, and this movement makes the sidebar
    overlap with the document (specifically, the
    scrollbar of the document) and causes other visual
    glitches.
    
    We now display a scrollbar at all times to make
    the sidebar width fixed and also to avoid flickering.
    This is the only portable/reliable way of avoiding
    flickering/jumping-around due to scrollbar showing
    and hiding. (Previously we had extra space in the
    parent, but at least in Chrome it now always pushes
    the canvas left when showing the scrollbar anyway,
    so we gain nothing but having a thin margin on the
    right, and we still got shifted left/right when
    the scrollbar show/hide.)
    
    Change-Id: Icbec841ffa4cec255e59f547530728f076d2877e
    Reviewed-on: https://gerrit.libreoffice.org/84713
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index 0af5b8ac9..fc2c817b7 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -147,7 +147,7 @@ body {
 	width: 100%;
 	height: 100%;
 	overflow-x: hidden;
-	overflow-y: auto;
+	overflow-y: scroll;
 	z-index: 1200;
 }
 
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 3614342c1..f753965c1 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -1033,7 +1033,7 @@ L.Control.LokDialog = L.Control.extend({
 		// set the canvas to have the actual size, while
 		// the image is rendred with the HiDPI scale.
 		this._setCanvasWidthHeight(canvas, this._dialogs[parentId].childwidth,
-										   this._dialogs[parentId].childheight);
+						this._dialogs[parentId].childheight);
 
 		var ctx = canvas.getContext('2d');
 		var img = new Image();
@@ -1046,10 +1046,6 @@ L.Control.LokDialog = L.Control.extend({
 
 	_resizeSidebar: function(strId, width) {
 		this._currentDeck.width = width;
-		if (width > 1 && !window.mode.isMobile()) {
-			// Add extra space for scrollbar only when visible
-			width = width + 15;
-		}
 		var deckOffset = 0;
 		var sidebar = L.DomUtil.get(strId);
 		if (sidebar) {
@@ -1059,7 +1055,11 @@ L.Control.LokDialog = L.Control.extend({
 				sidebar.style.width = width.toString() + 'px';
 		}
 
-		this._map.options.documentContainer.style.right = (width + 1).toString() + 'px';
+		var wrapper = L.DomUtil.get('sidebar-dock-wrapper');
+		if (wrapper && wrapper.offsetWidth)
+			this._map.options.documentContainer.style.right = wrapper.offsetWidth + 'px';
+		else
+			this._map.options.documentContainer.style.right = (width - 15).toString() + 'px';
 		var spreadsheetRowColumnFrame = L.DomUtil.get('spreadsheet-row-column-frame');
 		if (spreadsheetRowColumnFrame)
 			spreadsheetRowColumnFrame.style.right = width.toString() + 'px';


More information about the Libreoffice-commits mailing list