From 911f1155ce69a6c7929c622324e32e5462c4c556 Mon Sep 17 00:00:00 2001 From: Simo Elalj Date: Mon, 12 Feb 2024 17:28:55 +0100 Subject: [PATCH] updated to version 2.4.0 --- docs/maptable.js | 15 ++------------- package.json | 4 ++-- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/docs/maptable.js b/docs/maptable.js index bc3cbc9..5074ae1 100644 --- a/docs/maptable.js +++ b/docs/maptable.js @@ -148,10 +148,6 @@ this.d3.maptable = (function () { return newDate.toISOString().split('T')[1].substr(0, 5); }; - var isBlank = function isBlank(str) { - return str === null || str === '' || str === undefined; - }; - var utils = { rangeToBool: rangeToBool, appendOptions: appendOptions, @@ -161,8 +157,7 @@ this.d3.maptable = (function () { keyToTile: keyToTile, quantile: quantile, uniqueValues: uniqueValues, - formatDate: formatDate, - isBlank: isBlank + formatDate: formatDate }; var defaultOptions = { @@ -2540,7 +2535,6 @@ this.d3.maptable = (function () { rowNode.querySelector('.mt-filter-value-max').style.display = 'none'; } } - this.maptable.render.bind(this.maptable)(); } }, { key: 'getPossibleFilters', @@ -2584,7 +2578,7 @@ this.d3.maptable = (function () { var filterValueMin = rowNode.querySelector('.mt-filter-value-min').value; var filterValueMax = rowNode.querySelector('.mt-filter-value-max').value; if (filterValueMin === '' || filterValueMax === '') continue; - if (fmt && (fmt(d[filterName]) < fmt(filterValueMin) || fmt(d[filterName]) > fmt(filterValueMax))) { + if (fmt && d[filterName] !== '' && fmt(d[filterName]) !== '' && (fmt(d[filterName]) < fmt(filterValueMin) || fmt(d[filterName]) > fmt(filterValueMax))) { matched = false; } else if (parseInt(d[filterName], 10) < parseInt(filterValueMin, 10) || parseInt(d[filterName], 10) > parseInt(filterValueMax, 10)) { matched = false; @@ -2599,11 +2593,6 @@ this.d3.maptable = (function () { } } } - - if (fmt && utils.isBlank(fmt(d[filterName])) || utils.isBlank(d[filterName])) { - matched = false; - continue; - } } return matched; }); diff --git a/package.json b/package.json index 75fe3b2..1d24f2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "maptable", - "version": "2.3.0", + "version": "2.4.0", "description": "Visualization tool that transforms data to Map or/and Table (with filters)", "main": "dist/maptable.min.js", "homepage": "https://github.com/Packet-Clearing-House/maptable", @@ -48,4 +48,4 @@ "rollup-plugin-babel": "2.4.0", "underscore": "1.9.1" } -} +} \ No newline at end of file