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

Pranam Lashkari (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 28 08:30:27 UTC 2020


 loleaflet/src/control/Control.ContextMenu.js     |    1 -
 loleaflet/src/control/Control.JSDialogBuilder.js |    4 ++++
 loleaflet/src/layer/tile/CalcTileLayer.js        |    2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit d3780ad1416fd9eed013e8e766545c8dc7fce8e5
Author:     Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Wed Aug 26 04:06:24 2020 +0530
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Aug 28 10:30:08 2020 +0200

    leaflet: fixed show/hide comment in context menu
    
    Change-Id: Ia18c92832c0dd0de5a09b6e434b4afe4ca9afb26
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101375
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js
index db34a5600..3f0a4c035 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -78,7 +78,6 @@ L.Control.ContextMenu = L.Control.extend({
 			'SpellingAndGrammarDialog', 'FontDialog', 'FontDialogForParagraph',
 			// spreadsheet
 			'FormatCellDialog',
-			'ShowNote', 'HideNote', 'DeleteNote',
 		]
 	},
 
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index ca72b9be7..ab9056aef 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -2163,6 +2163,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
 					     data.command.startsWith('.uno:InsertPageFooter')) &&
 					    data.checked && data.checked === true) {
 						return;
+					} else if (data.command === '.uno:ShowNote') {
+						builder.map._docLayer.showAnnotationFromCurrentCell();
+					} else if (data.command === '.uno:HideNote') {
+						builder.map._docLayer.hideAnnotationFromCurrentCell();
 					}
 					builder.map.sendUnoCommand(data.command);
 				}
diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js
index 35eae4c14..c5072f233 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -130,7 +130,7 @@ L.CalcTileLayer = (L.Browser.mobile ? L.TileLayer : L.CanvasTileLayer).extend({
 		var annotations = this._annotations[this._selectedPart];
 		for (var key in annotations) {
 			var annotation = annotations[key]._annotation;
-			if (this._cellCursor.contains(annotation._data.cellPos)) {
+			if (this._cellCursor.intersects(annotation._data.cellPos)) {
 				this._map.addLayer(annotation);
 				annotation.show();
 			}


More information about the Libreoffice-commits mailing list