mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
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:
1 parent
750dab0123
commit
9d3e99c831
2 files changed
+63
-11
No files matched your search
+12
-11
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user