From 34bb2d6eb81d40e343f890508296c4a8b2c4da1e Mon Sep 17 00:00:00 2001 From: Joachim Schleicher Date: Tue, 14 Nov 2023 20:48:11 +0100 Subject: [PATCH] fix null opacity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit partly revert 952385 - since ´null´ is actually used in ternary fields. Remove null opacity from the testcase. It should be either unset or a numeric value. --- umap/static/umap/js/umap.core.js | 2 +- umap/static/umap/test/_pre.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/umap/static/umap/js/umap.core.js b/umap/static/umap/js/umap.core.js index fbbbd901..a9398945 100644 --- a/umap/static/umap/js/umap.core.js +++ b/umap/static/umap/js/umap.core.js @@ -161,7 +161,7 @@ L.Util.detectFileType = (f) => { } L.Util.usableOption = (options, option) => - options[option] !== undefined && options[option] !== '' && options[option] !== null + options[option] !== undefined && options[option] !== '' L.Util.greedyTemplate = (str, data, ignore) => { function getValue(data, path) { diff --git a/umap/static/umap/test/_pre.js b/umap/static/umap/test/_pre.js index fa3ad7fe..4c8d244f 100644 --- a/umap/static/umap/test/_pre.js +++ b/umap/static/umap/test/_pre.js @@ -92,14 +92,12 @@ var defaultDatalayerData = function (custom) { displayOnLoad: true, id: 62, pictogram_url: null, - opacity: null, weight: null, fillColor: '', color: '', stroke: true, smoothFactor: null, dashArray: '', - fillOpacity: null, fill: true, } return L.extend({}, _default, custom)