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

Szymon Kłos (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 7 08:30:39 UTC 2019


 loleaflet/src/layer/AnnotationManager.js |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit d3aed5b6df90d91792308c9d87e4331aa45a5a4b
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Jun 7 10:21:13 2019 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Jun 7 10:30:21 2019 +0200

    Add annotation-active class when active
    
    Change-Id: I53768271de756c2ea0c741996ebec9e0845bd47c
    Reviewed-on: https://gerrit.libreoffice.org/73644
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>
    (cherry picked from commit a22e652db40dd06d9a707e2debd9c37e56711ba7)
    Reviewed-on: https://gerrit.libreoffice.org/73645
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Tested-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js
index c8a623639..a4a4d2754 100644
--- a/loleaflet/src/layer/AnnotationManager.js
+++ b/loleaflet/src/layer/AnnotationManager.js
@@ -243,6 +243,8 @@ L.AnnotationManager = L.Class.extend({
 
 	unselect: function () {
 		if (this._selected) {
+			if ($(this._selected._container).hasClass('annotation-active'))
+				$(this._selected._container).removeClass('annotation-active');
 			this._selected = null;
 			this.update();
 		}
@@ -253,6 +255,8 @@ L.AnnotationManager = L.Class.extend({
 			// Select the root comment
 			var idx = this.getRootIndexOf(annotation._data.id);
 			this._selected = this._items[idx];
+			if (!$(this._selected._container).hasClass('annotation-active'))
+				$(this._selected._container).addClass('annotation-active');
 			this.update();
 		}
 	},


More information about the Libreoffice-commits mailing list