mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-31 04:02:26 +08:00
feat(geo_map): react to changes in hierarchy
This commit is contained in:
parent
15881dfb6b
commit
7a0199595d
@ -330,6 +330,14 @@ export default class GeoMapTypeWidget extends TypeWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) {
|
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();
|
const attributeRows = loadResults.getAttributeRows();
|
||||||
if (attributeRows.find((at) => at.name === LOCATION_ATTRIBUTE)) {
|
if (attributeRows.find((at) => at.name === LOCATION_ATTRIBUTE)) {
|
||||||
this.#reloadMarkers();
|
this.#reloadMarkers();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user