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

Dennis Francis (via logerrit) logerrit at kemper.freedesktop.org
Fri May 1 02:13:30 UTC 2020


 loleaflet/src/layer/tile/TileLayer.js |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 903488a7821872234c5f6b8cce5325ca97ef829a
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Thu Apr 30 11:46:16 2020 +0530
Commit:     Dennis Francis <dennis.francis at collabora.com>
CommitDate: Fri May 1 04:13:09 2020 +0200

    Lets make 'dropdown marker' icon active
    
    Before this, the dropdown marker icon was just trying to mirror the
    exact shape and position of the validity list button in core.
    It is a lot easier just to have the js icon according to our
    styling and in its click handler, sent '.uno:DataSelect' command to
    core. It saves us the trouble of mirroring the core's button which
    apparently is not zoom adjusted. With non-default dpiscale, it takes
    more effort to mirror it exactly.
    
    Change-Id: Ibe15293e9052dfacf01be94ed4950d1842e46c4b
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93210
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Dennis Francis <dennis.francis at collabora.com>

diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 7662b71a2..adf022776 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -156,7 +156,7 @@ L.TileLayer = L.GridLayer.extend({
 				className: 'spreadsheet-drop-down-marker',
 				iconSize: null
 			}),
-			interactive: false
+			interactive: true
 		});
 
 		this._cellResizeMarkerStart = L.marker(new L.LatLng(0, 0), {
@@ -337,6 +337,7 @@ L.TileLayer = L.GridLayer.extend({
 		this._cellResizeMarkerStart.on('dragstart drag dragend', this._onCellResizeMarkerDrag, this);
 		this._cellResizeMarkerEnd.on('dragstart drag dragend', this._onCellResizeMarkerDrag, this);
 		this._cellAutofillMarker.on('dragstart drag dragend', this._onCellResizeMarkerDrag, this);
+		this._dropDownButton.on('click', this._onDropDownButtonClick, this);
 
 		map.setPermission(this.options.permission);
 
@@ -2830,6 +2831,12 @@ L.TileLayer = L.GridLayer.extend({
 		}
 	},
 
+	_onDropDownButtonClick: function () {
+		if (this._validatedCellXY && this._cellCursorXY && this._validatedCellXY.equals(this._cellCursorXY)) {
+			this._map.sendUnoCommand('.uno:DataSelect');
+		}
+	},
+
 	// Update group layer selection handler.
 	_onUpdateGraphicSelection: function () {
 		if (this._graphicSelection && !this._isEmptyRectangle(this._graphicSelection)) {


More information about the Libreoffice-commits mailing list