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 511d0cd956ea10b52c7b19aafa5b3fa2a4c6f6fc
Author:     Pranam Lashkari <lpra...@collabora.com>
AuthorDate: Mon Aug 31 17:54:15 2020 +0530
Commit:     Pranam Lashkari <lpra...@collabora.com>
CommitDate: Mon Aug 31 19:22:56 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/+/101727
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Pranam Lashkari <lpra...@collabora.com>

diff --git a/loleaflet/css/leaflet.css b/loleaflet/css/leaflet.css
index 88ee4572a..d8f1217ce 100644
--- a/loleaflet/css/leaflet.css
+++ b/loleaflet/css/leaflet.css
@@ -184,10 +184,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 e60639b08..90f4afced 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -47,14 +47,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 bc2f590ed..1595be0b0 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -842,6 +842,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 b7a0ba1a9..4e415b620 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');
@@ -33,6 +34,7 @@ L.Cursor = L.Layer.extend({
        },
 
        onRemove: function () {
+               $('.leaflet-pane.leaflet-map-pane').css('cursor', '');
                if (this._container) {
                        this.getPane().removeChild(this._container);
                }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to