Skip to content

Commit

Permalink
fix(web): selection indicator not disappearing on base map click (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
catpotd authored May 13, 2024
1 parent c4dab91 commit 5caa55b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/engines/Cesium/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,12 @@ export default ({
const viewer = cesium.current?.cesiumElement;
if (!viewer || viewer.isDestroyed()) return;

if (!target || typeof target === "undefined" || !("id" in target && target.id)) {
viewer.selectedEntity = undefined;
onLayerSelect?.();
return;
}

const entity =
findEntity(viewer, undefined, selectedLayerId?.featureId) ||
findEntity(viewer, selectedLayerId?.layerId);
Expand Down

0 comments on commit 5caa55b

Please sign in to comment.