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

Henry Castro hcastro at collabora.com
Sat Apr 14 00:32:58 UTC 2018


 loleaflet/src/control/Control.LokDialog.js |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit ac3261b1fa6601329c8f86e164cae08c8f149010
Author: Henry Castro <hcastro at collabora.com>
Date:   Fri Apr 13 20:27:34 2018 -0400

    loleaflet: fix lint error, no-redeclare
    
    Change-Id: If367b19cf0c1d382a417cf85748d5275389af2ec

diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index a3d255af5..5766458c8 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -88,6 +88,7 @@ L.Control.LokDialog = L.Control.extend({
 
 	_onDialogMsg: function(e) {
 		e.id = parseInt(e.id);
+		var left, top;
 		var strDlgId = this._toDlgPrefix(e.id);
 
 		if (e.action === 'created') {
@@ -95,8 +96,8 @@ L.Control.LokDialog = L.Control.extend({
 			var height = parseInt(e.size.split(',')[1]);
 
 			if (e.winType === 'dialog') {
-				var left = (e.position != null)? parseInt(e.position.split(',')[0]): null;
-				var top = (e.position != null)? parseInt(e.position.split(',')[1]): null;
+				left = (e.position != null)? parseInt(e.position.split(',')[0]): null;
+				top = (e.position != null)? parseInt(e.position.split(',')[1]): null;
 
 				this._launchDialog(this._toDlgPrefix(e.id), left, top, width, height, e.title);
 				this._sendPaintWindow(e.id, this._createRectStr(e.id));
@@ -105,8 +106,8 @@ L.Control.LokDialog = L.Control.extend({
 					return;
 
 				var parentId = parseInt(e.parentId);
-				var left = parseInt(e.position.split(',')[0]);
-				var top = parseInt(e.position.split(',')[1]);
+				left = parseInt(e.position.split(',')[0]);
+				top = parseInt(e.position.split(',')[1]);
 
 				this._removeDialogChild(parentId);
 				this._dialogs[parentId].childid = e.id;


More information about the Libreoffice-commits mailing list