From 44dbf2f0df6e13ffb992ef26460ce5745f41e8cb Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 21 Jan 2025 11:46:57 +0100 Subject: [PATCH] fix: fix circle icon no longer hihlighted fix #2429 --- umap/static/umap/js/modules/rendering/icon.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/umap/static/umap/js/modules/rendering/icon.js b/umap/static/umap/js/modules/rendering/icon.js index 83a0aeed..4dfaf845 100644 --- a/umap/static/umap/js/modules/rendering/icon.js +++ b/umap/static/umap/js/modules/rendering/icon.js @@ -70,6 +70,11 @@ const BaseIcon = DivIcon.extend({ }, onAdd: () => {}, + + _setIconStyles: function (img, name) { + if (this.feature.isActive()) this.options.className += ' umap-icon-active' + DivIcon.prototype._setIconStyles.call(this, img, name) + }, }) const DefaultIcon = BaseIcon.extend({ @@ -86,7 +91,6 @@ const DefaultIcon = BaseIcon.extend({ }, _setIconStyles: function (img, name) { - if (this.feature.isActive()) this.options.className += ' umap-icon-active' BaseIcon.prototype._setIconStyles.call(this, img, name) const color = this._getColor() const opacity = this._getOpacity()