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

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 10 13:42:21 UTC 2019


 loleaflet/src/control/Control.ColumnHeader.js |    2 +-
 loleaflet/src/control/Control.RowHeader.js    |    2 +-
 loleaflet/src/control/Control.Toolbar.js      |   14 +++++++-------
 loleaflet/src/control/Signing.js              |    6 +++---
 loleaflet/src/map/Map.js                      |    6 +++---
 5 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 30f37ef7b080c12febea4971a4ac5cf26a517c5c
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Oct 10 09:26:29 2019 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Thu Oct 10 15:41:56 2019 +0200

    loleaflet: debug: use unique name for document container
    
    I had a not good debugging session trying to find out when
    the CSS properties of the document container are changing dynamically.
    The best scenario is to use the unique name documentContainer, so we can
    track all CSS properties dynamic changes, and it can set breakpoint in a
    suspicious change for deeper analysis.
    
    Change-Id: I3accef1c374689f04da336cd0a84047b498540b1
    Reviewed-on: https://gerrit.libreoffice.org/80610
    Reviewed-by: Henry Castro <hcastro at collabora.com>
    Tested-by: Henry Castro <hcastro at collabora.com>

diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js
index d83c8303c..2b96ed317 100644
--- a/loleaflet/src/control/Control.ColumnHeader.js
+++ b/loleaflet/src/control/Control.ColumnHeader.js
@@ -672,7 +672,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({
 			return;
 
 		var rowHeader = L.DomUtil.get('spreadsheet-header-rows-container');
-		var document = L.DomUtil.get('document-container');
+		var document = this.options.documentContainer;
 
 		this._setCornerCanvasHeight(height);
 		var deltaTop = height - this._canvasHeight;
diff --git a/loleaflet/src/control/Control.RowHeader.js b/loleaflet/src/control/Control.RowHeader.js
index a0116122a..ab566a9a1 100644
--- a/loleaflet/src/control/Control.RowHeader.js
+++ b/loleaflet/src/control/Control.RowHeader.js
@@ -635,7 +635,7 @@ L.Control.RowHeader = L.Control.Header.extend({
 			return;
 
 		var columnHeader = L.DomUtil.get('spreadsheet-header-columns-container');
-		var document = L.DomUtil.get('document-container');
+		var document = this.options.documentContainer;
 
 		this._setCornerCanvasWidth(width);
 
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index fd018929e..7521180db 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1577,7 +1577,7 @@ function onDocLayerInit() {
 	if (!window.ThisIsTheiOSApp && window.mode.isTablet()) {
 		map.hideMenubar();
 
-		$('#document-container').addClass('tablet');
+		$(map.options.documentContainer).addClass('tablet');
 		$('#spreadsheet-row-column-frame').addClass('tablet');
 
 		$('#tb_editbar_item_fonts').css({'display': 'none'});
@@ -2113,15 +2113,15 @@ function onUpdatePermission(e) {
 			$('#toolbar-down').show();
 			switch (map._docLayer._docType) {
 			case 'text':
-				$('#document-container').css('bottom', '35px');
+				$(map.options.documentContainer).css('bottom', '35px');
 				break;
 			case 'spreadsheet':
-				$('#document-container').css('bottom', '68px');
+				$(map.options.documentContainer).css('bottom', '68px');
 				$('#spreadsheet-row-column-frame').css('bottom', '68px');
 				$('#spreadsheet-toolbar').show();
 				break;
 			case 'presentation':
-				$('#document-container').css('bottom', '95px');
+				$(map.options.documentContainer).css('bottom', '95px');
 				break;
 			}
 		}
@@ -2170,15 +2170,15 @@ function onUpdatePermission(e) {
 			$('#toolbar-down').hide();
 			switch (map._docLayer._docType) {
 			case 'text':
-				$('#document-container').css('bottom', '0px');
+				$(map.options.documentContainer).css('bottom', '0px');
 				break;
 			case 'spreadsheet':
-				$('#document-container').css('bottom', '35px');
+				$(map.options.documentContainer).css('bottom', '35px');
 				$('#spreadsheet-row-column-frame').css('bottom', '35px');
 				$('#spreadsheet-toolbar').show();
 				break;
 			case 'presentation':
-				$('#document-container').css('bottom', '0px');
+				$(map.options.documentContainer).css('bottom', '0px');
 				break;
 			}
 		}
diff --git a/loleaflet/src/control/Signing.js b/loleaflet/src/control/Signing.js
index 4cb539bd1..4489f325f 100644
--- a/loleaflet/src/control/Signing.js
+++ b/loleaflet/src/control/Signing.js
@@ -437,9 +437,9 @@ L.Map.include({
 	showSignDocument: function() {
 		$('#document-signing-bar').show();
 		this.initializeLibrary();
-		oldtoolbarSize = $('#document-container').css('top');
+		oldtoolbarSize = $(this.options.documentContainer).css('top');
 
-		$('#document-container').css('top', '116px');
+		$(this.options.documentContainer).css('top', '116px');
 
 		// Avoid scroll button ">>"
 		var el = w2ui['document-signing-bar'];
@@ -451,7 +451,7 @@ L.Map.include({
 		library = null;
 		identity = null;
 		currentPassport = null;
-		$('#document-container').css('top', oldtoolbarSize);
+		$(this.options.documentContainer).css('top', oldtoolbarSize);
 	},
 	signingInitializeBar: function() {
 		$('#document-signing-bar').hide();
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 89c80ff98..20e948353 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -148,7 +148,7 @@ L.Map = L.Evented.extend({
 
 		// Avoid white bar on the bottom - force resize-detector to get full size
 		if (window.mode.isMobile()) {
-			$('#document-container').css('bottom', '0px');
+			$(this.options.documentContainer).css('bottom', '0px');
 			$(this._resizeDetector).css('bottom', '0px');
 		}
 
@@ -1678,7 +1678,7 @@ L.Map = L.Evented.extend({
 		obj.addClass('fold');
 
 		moveObjectVertically($('#spreadsheet-row-column-frame'), 36);
-		moveObjectVertically($('#document-container'), 36);
+		moveObjectVertically($(this.options.documentContainer), 36);
 		moveObjectVertically($('#presentation-controls-wrapper'), 36);
 		moveObjectVertically($('#sidebar-dock-wrapper'), 36);
 	},
@@ -1696,7 +1696,7 @@ L.Map = L.Evented.extend({
 		obj.addClass('unfold');
 
 		moveObjectVertically($('#spreadsheet-row-column-frame'), -36);
-		moveObjectVertically($('#document-container'), -36);
+		moveObjectVertically($(this.options.documentContainer), -36);
 		moveObjectVertically($('#presentation-controls-wrapper'), -36);
 		moveObjectVertically($('#sidebar-dock-wrapper'), -36);
 	},


More information about the Libreoffice-commits mailing list