You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by kg...@apache.org on 2023/06/16 12:31:00 UTC
[superset] branch master updated: fix: deck.gl Geojson path not visible (#24428)
This is an automated email from the ASF dual-hosted git repository.
kgabryje pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 6bb930ef4e fix: deck.gl Geojson path not visible (#24428)
6bb930ef4e is described below
commit 6bb930ef4ed26ea381e7f8e889851aa7867ba0eb
Author: Kamil Gabryjelski <ka...@gmail.com>
AuthorDate: Fri Jun 16 14:30:52 2023 +0200
fix: deck.gl Geojson path not visible (#24428)
---
.../src/layers/Geojson/Geojson.jsx | 9 +++++----
.../src/layers/Geojson/controlPanel.ts | 20 +++++++++++++++++---
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/Geojson.jsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/Geojson.jsx
index 0aefc74293..263b576ec9 100644
--- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/Geojson.jsx
+++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/Geojson.jsx
@@ -123,14 +123,15 @@ export function getLayer(formData, payload, onAddFilter, setTooltip) {
return new GeoJsonLayer({
id: `geojson-layer-${fd.slice_id}`,
- filled: fd.filled,
data: features,
- stroked: fd.stroked,
extruded: fd.extruded,
- pointRadiusScale: fd.point_radius_scale,
+ filled: fd.filled,
+ stroked: fd.stroked,
getFillColor,
- getLineWidth: fd.line_width || 1,
getLineColor,
+ getLineWidth: fd.line_width || 1,
+ pointRadiusScale: fd.point_radius_scale,
+ lineWidthUnits: fd.line_width_unit,
...commonLayerProps(fd, setTooltip, setTooltipContent),
});
}
diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/controlPanel.ts
index 352e8867b2..894c09853a 100644
--- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/controlPanel.ts
+++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/controlPanel.ts
@@ -69,8 +69,23 @@ const config: ControlPanelConfig = {
controlSetRows: [
[fillColorPicker, strokeColorPicker],
[filled, stroked],
- [extruded, null],
- [lineWidth, null],
+ [extruded],
+ [lineWidth],
+ [
+ {
+ name: 'line_width_unit',
+ config: {
+ type: 'SelectControl',
+ label: t('Line width unit'),
+ default: 'meters',
+ choices: [
+ ['meters', t('meters')],
+ ['pixels', t('pixels')],
+ ],
+ renderTrigger: true,
+ },
+ },
+ ],
[
{
name: 'point_radius_scale',
@@ -83,7 +98,6 @@ const config: ControlPanelConfig = {
choices: formatSelectOptions([0, 100, 200, 300, 500]),
},
},
- null,
],
],
},