Working
This commit is contained in:
parent
14a3555cf1
commit
7e92bf112e
34 changed files with 1214437 additions and 224 deletions
|
|
@ -143,6 +143,13 @@ export function useDeckLayers({
|
|||
const colorFeatureMetaRef = useRef(colorFeatureMeta);
|
||||
colorFeatureMetaRef.current = colorFeatureMeta;
|
||||
|
||||
// Track enum value count for discrete coloring (0 = numeric/continuous)
|
||||
const enumCountRef = useRef(0);
|
||||
enumCountRef.current =
|
||||
colorFeatureMeta?.type === 'enum' && colorFeatureMeta.values
|
||||
? colorFeatureMeta.values.length
|
||||
: 0;
|
||||
|
||||
// --- Count ranges ---
|
||||
const countRange = useMemo(() => {
|
||||
if (data.length === 0) return { min: 0, max: 1 };
|
||||
|
|
@ -360,7 +367,8 @@ export function useDeckLayers({
|
|||
0,
|
||||
densityGradientRef.current,
|
||||
dark,
|
||||
255
|
||||
255,
|
||||
enumCountRef.current
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -433,7 +441,8 @@ export function useDeckLayers({
|
|||
0,
|
||||
densityGradientRef.current,
|
||||
dark,
|
||||
180
|
||||
180,
|
||||
enumCountRef.current
|
||||
);
|
||||
}
|
||||
const cr = postcodeCountRangeRef.current;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue