From 65ba1cd3ee0f1b8e227e7a19a02b7d8c66030a02 Mon Sep 17 00:00:00 2001 From: Joachim Schleicher Date: Wed, 11 Oct 2023 19:56:34 +0200 Subject: [PATCH] simply call _redraw to reset style thanks for the review to @yohanboniface --- umap/static/umap/js/umap.features.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/umap/static/umap/js/umap.features.js b/umap/static/umap/js/umap.features.js index e058ba0d..cf256d09 100644 --- a/umap/static/umap/js/umap.features.js +++ b/umap/static/umap/js/umap.features.js @@ -828,14 +828,6 @@ L.U.PathMixin = { }) }, - resetPath: function () { - this.parentClass.prototype.setStyle.call(this, { - fillOpacity: this.getDynamicOption('fillOpacity'), - opacity: this.getDynamicOption('opacity'), - weight: this.getDynamicOption('weight'), - }) - }, - _onMouseOver: function () { if (this.map.measureTools && this.map.measureTools.enabled()) { this.map.ui.tooltip({ content: this.getMeasure(), anchor: this }) @@ -850,7 +842,7 @@ L.U.PathMixin = { this.on('edit', this.makeDirty) this.on('drag editable:drag', this._onDrag) this.on('popupopen', this.highlightPath) - this.on('popupclose', this.resetPath) + this.on('popupclose', this._redraw) }, _onDrag: function () {