Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
[fix] Text labels: can't set prop to false/0 with multiple labels (#2354)
Igor Dykhtacfee75a2d737
diff --git a/src/reducers/src/vis-state-updaters.ts b/src/reducers/src/vis-state-updaters.tsindex 0e44dbb8d..a7461b75d 100644--- a/src/reducers/src/vis-state-updaters.ts+++ b/src/reducers/src/vis-state-updaters.ts@@ -575,11 +575,11 @@ function updateTextLabelPropAndValue(idx, prop, value, textLabel) {let newTextLabel = textLabel.slice();- if (prop && (value || textLabel.length === 1)) {- newTextLabel = textLabel.map((tl, i) => (i === idx ? {...tl, [prop]: value} : tl));- } else if (prop === 'field' && value === null && textLabel.length > 1) {+ if (prop === 'field' && value === null && textLabel.length > 1) {// remove label when field value is set to nullnewTextLabel.splice(idx, 1);+ } else if (prop) {+ newTextLabel = textLabel.map((tl, i) => (i === idx ? {...tl, [prop]: value} : tl));}return newTextLabel;