Cesium draw: a clustered icon set clusters again after setColumns

The wrapper that marks a clustered set for clustering again ran before
setColumns was assigned, so column changes never reclustered; with no rows
moving, positions or shown written by columns left the old clusters drawn.
setColumns is now assigned first and wrapped with the rest.
This commit is contained in:
Sameh Khamis committed 2026-11-11 19:29:04 -08:00
1 parent 750dab0123
commit 9d3e99c831
2 files changed
+63 -11

No files matched your search

+12 -11
View File
@@ -647,7 +647,18 @@ export function createCesiumDraw({
requestRender();
},
};
// A clustered set clusters again in the next frame drawn after a change.
// `columns`: column updates of an icon set, on the GPU.
if (kind === 'icons' && capabilities.has('columns'))
handle.setColumns = (columns) => {
onGpu(record, [], false, true);
record.gpu.columns(columns);
patched();
};
// Any other set takes columns as the rows they make, replacing its items.
else if (capabilities.has('columns'))
handle.setColumns = (columns) => handle.set(columnRows(columns, items));
// A clustered set clusters again in the next frame drawn after a change
// (`setColumns` too: set before this, so it is wrapped with the rest).
for (const name of [
'set',
'upsert',
@@ -722,16 +733,6 @@ export function createCesiumDraw({
handle.upsert([...record.inertialDraped.values()]);
};
}
// `columns`: column updates of an icon set, on the GPU.
if (kind === 'icons' && capabilities.has('columns'))
handle.setColumns = (columns) => {
onGpu(record, [], false, true);
record.gpu.columns(columns);
patched();
};
// Any other set takes columns as the rows they make, replacing its items.
else if (capabilities.has('columns'))
handle.setColumns = (columns) => handle.set(columnRows(columns, items));
sets.set(spec.id, record);
setsVersion += 1;
return handle;