From 9ef09512db7b2bb57e1e0517a41e620c26088e02 Mon Sep 17 00:00:00 2001 From: Joachim Schleicher Date: Tue, 10 Oct 2023 10:47:36 +0200 Subject: [PATCH] highlight: increase fillOpacity for polygons sqrt gives larger increase for low opacities like 0.2 while preserving some (tiny) shine-through for large values like 0.8 and is limited to the desired range of (0,1] --- umap/static/umap/js/umap.features.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/umap/static/umap/js/umap.features.js b/umap/static/umap/js/umap.features.js index 60dbc112..e058ba0d 100644 --- a/umap/static/umap/js/umap.features.js +++ b/umap/static/umap/js/umap.features.js @@ -822,6 +822,7 @@ L.U.PathMixin = { highlightPath: function () { this.parentClass.prototype.setStyle.call(this, { + fillOpacity: Math.sqrt(this.getDynamicOption('fillOpacity')), opacity: 1.0, weight: 1.3 * this.getDynamicOption('weight'), }) @@ -829,6 +830,7 @@ L.U.PathMixin = { resetPath: function () { this.parentClass.prototype.setStyle.call(this, { + fillOpacity: this.getDynamicOption('fillOpacity'), opacity: this.getDynamicOption('opacity'), weight: this.getDynamicOption('weight'), })