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

Henry Castro hcastro at collabora.com
Wed Oct 12 21:29:43 UTC 2016


 loleaflet/dist/spreadsheet.css          |    1 -
 loleaflet/src/control/Control.Header.js |   17 +++++------------
 2 files changed, 5 insertions(+), 13 deletions(-)

New commits:
commit 25dce7a30f5519b2dd6f3316355c9dc1c76ec9ed
Author: Henry Castro <hcastro at collabora.com>
Date:   Wed Oct 12 17:30:52 2016 -0400

    loleaflet: column/row re-size cleanup

diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css
index 30c992c..c119f05 100644
--- a/loleaflet/dist/spreadsheet.css
+++ b/loleaflet/dist/spreadsheet.css
@@ -138,7 +138,6 @@
 	padding: 0px;
 	margin: 0px;
 	height: 100%;
-	cursor: pointer;
 	overflow: hidden;
 	}
 
diff --git a/loleaflet/src/control/Control.Header.js b/loleaflet/src/control/Control.Header.js
index 24ed4f7..a3014a1 100644
--- a/loleaflet/src/control/Control.Header.js
+++ b/loleaflet/src/control/Control.Header.js
@@ -39,26 +39,19 @@ L.Control.Header = L.Control.extend({
 
 	_onMouseMove: function (e) {
 		this._dragging = true;
+		L.DomEvent.preventDefault(e);
 
 		var target = e.target || e.srcElement;
-		if ((L.DomUtil.hasClass(target, 'spreadsheet-header-column-text') ||
-		     L.DomUtil.hasClass(target, 'spreadsheet-header-row-text')) &&
-		    target.style.cursor != this.options.cursor) {
-			this._cursor = target.style.cursor;
-			this._target = target;
+		if (target.style.cursor !== this.options.cursor &&
+		   (L.DomUtil.hasClass(target, 'spreadsheet-header-column-text') ||
+		    L.DomUtil.hasClass(target, 'spreadsheet-header-row-text'))) {
 			target.style.cursor = this.options.cursor;
 		}
 
-		L.DomEvent.preventDefault(e);
-
 		this.onDragMove(this._item, this._start, this._offset, e);
 	},
 
 	_onMouseUp: function (e) {
-		if (this._target) {
-			this._target.style.cursor = this._oldCursor;
-		}
-
 		L.DomEvent.off(document, 'mousemove', this._onMouseMove, this);
 		L.DomEvent.off(document, 'mouseup', this._onMouseUp, this);
 
@@ -73,7 +66,7 @@ L.Control.Header = L.Control.extend({
 			setTimeout(L.bind(this.initialize, this), 400);
 		}
 
-		this._target = this._cursor = this._item = this._start = this._offset = null;
+		this._item = this._start = this._offset = null;
 		this._dragging = false;
 	},
 


More information about the Libreoffice-commits mailing list