rusackas commented on code in PR #33247:
URL: https://github.com/apache/superset/pull/33247#discussion_r3415600476
##########
superset-frontend/plugins/preset-chart-deckgl/src/layers/Geojson/Geojson.tsx:
##########
@@ -328,7 +328,11 @@ export const getLayer: GetLayerType<GeoJsonLayer> =
function ({
getFillColor(feature, filterState?.value),
getLineColor,
getLineWidth: fd.line_width || 1,
- pointRadiusScale: fd.point_radius_scale,
+ // Use deck.gl defaults as fallbacks for backward compatibility with
existing charts.
+ // New charts will get control panel defaults (point_radius=10,
units='pixels', scale=1).
+ getPointRadius: fd.point_radius ?? 1,
+ pointRadiusUnits: fd.point_radius_units ?? 'meters',
+ pointRadiusScale: fd.point_radius_scale ?? 1,
Review Comment:
Good catch, free-form input can definitely sneak a string through. Wrapped
both in a NaN-safe `Number()` coercion (with the deck.gl defaults as fallback)
and added a test for the string case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]