Skip to content

Commit

Permalink
feat(geo_map): react to changes in hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
eliandoran committed Feb 1, 2025
1 parent 15881df commit 7a01995
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/public/app/widgets/type_widgets/geo_map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,14 @@ export default class GeoMapTypeWidget extends TypeWidget {
}

entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) {
// If any of the children branches are altered.
if (loadResults.getBranchRows().find((branch) => branch.parentNoteId === this.noteId)) {
this.#reloadMarkers();
return;
}

// If any of note has its location attribute changed.
// TODO: Should probably filter by parent here as well.
const attributeRows = loadResults.getAttributeRows();
if (attributeRows.find((at) => at.name === LOCATION_ATTRIBUTE)) {
this.#reloadMarkers();
Expand Down

0 comments on commit 7a01995

Please sign in to comment.