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

Pranam Lashkari (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 20 07:55:38 UTC 2020


 loleaflet/css/leaflet.css                |    5 +----
 loleaflet/css/loleaflet.css              |    6 +++---
 loleaflet/src/control/Control.Toolbar.js |    6 ++++++
 loleaflet/src/layer/marker/Cursor.js     |    4 +++-
 4 files changed, 13 insertions(+), 8 deletions(-)

New commits:
commit cb5e5b3e505aa85e13d74fe7fc2eb263138c1306
Author:     Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Thu Jul 9 16:50:27 2020 +0530
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Aug 20 09:55:19 2020 +0200

    leaflet: changing cursor according to objects selected
    
    text cursor only if cursor is visible
    appropriate cursor for drag markers
    move cursor for selected object
    
    Change-Id: If750ac91fc870a0d730d4455c51bde0423c55e4a
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98425
    Tested-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/css/leaflet.css b/loleaflet/css/leaflet.css
index 98f6aa71b..67899f262 100644
--- a/loleaflet/css/leaflet.css
+++ b/loleaflet/css/leaflet.css
@@ -185,10 +185,7 @@
 /* cursors */
 
 .leaflet-interactive {
-	cursor: pointer;
-	}
-.leaflet-container {
-	cursor: text;
+	cursor: move;
 	}
 .leaflet-crosshair,
 .leaflet-crosshair .leaflet-interactive {
diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index 2c3703763..1b84d1091 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -69,14 +69,14 @@
 	z-index: 1000;
 }
 
-#document-container.text-doctype > #map{
-	cursor: text;
-}
 .scroll-container .mCSB_scrollTools.mCSB_1_scrollbar {
 	position: absolute;
 	z-index: 1000;
 }
 
+.bucket-cursor {
+	cursor: url('images/cursors/fill.png'), auto !important;
+}
 .loleaflet-scrollbar-show {
 	opacity: 1 !important;
 	filter: "alpha(opacity=100)" !important;
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index 8e4aaf6af..9a124cf88 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -838,6 +838,12 @@ function onCommandStateChanged(e) {
 			toolbar.disable('repair');
 		}
 	}
+	else if (commandName === '.uno:FormatPaintbrush') {
+		if (state === 'true')
+			$('.leaflet-pane.leaflet-map-pane').addClass('bucket-cursor');
+		else
+			$('.leaflet-pane.leaflet-map-pane').removeClass('bucket-cursor');
+	}
 
 	var id = unoCmdToToolbarId(commandName);
 	// id is set to '' by unoCmdToToolbarId() if the statechange message should be ignored.
diff --git a/loleaflet/src/layer/marker/Cursor.js b/loleaflet/src/layer/marker/Cursor.js
index c668c205f..71cd97a00 100644
--- a/loleaflet/src/layer/marker/Cursor.js
+++ b/loleaflet/src/layer/marker/Cursor.js
@@ -3,6 +3,7 @@
  * L.Cursor blinking cursor.
  */
 
+ /* global $ */
 L.Cursor = L.Layer.extend({
 
 	options: {
@@ -22,7 +23,7 @@ L.Cursor = L.Layer.extend({
 		if (!this._container) {
 			this._initLayout();
 		}
-
+		$('.leaflet-pane.leaflet-map-pane').css('cursor', 'text');
 		this._zoomAnimated = this._zoomAnimated && this.options.zoomAnimation;
 		if (this._zoomAnimated) {
 			L.DomUtil.addClass(this._container, 'leaflet-zoom-animated');
@@ -35,6 +36,7 @@ L.Cursor = L.Layer.extend({
 
 	onRemove: function () {
 		this._map.off('splitposchanged', this.update, this);
+		$('.leaflet-pane.leaflet-map-pane').css('cursor', '');
 		if (this._container) {
 			this.getPane().removeChild(this._container);
 		}


More information about the Libreoffice-commits mailing list