Update map markers when bookmarks are added/removed

This commit is contained in:
2026-01-16 12:41:05 +07:00
parent 83461b0748
commit f95b4d6328
3 changed files with 30 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ export default class ApplicationComponent extends Component {
@tracked nearbyPlaces = null;
@tracked selectedPlace = null;
@tracked isSidebarOpen = false;
@tracked bookmarksVersion = 0;
constructor() {
super(...arguments);
@@ -39,6 +40,11 @@ export default class ApplicationComponent extends Component {
this.selectedPlace = null;
}
@action
refreshBookmarks() {
this.bookmarksVersion++;
}
<template>
{{pageTitle "M/\RCO"}}
@@ -46,6 +52,7 @@ export default class ApplicationComponent extends Component {
@onPlacesFound={{this.showPlaces}}
@isSidebarOpen={{this.isSidebarOpen}}
@onOutsideClick={{this.closeSidebar}}
@bookmarksVersion={{this.bookmarksVersion}}
/>
{{#if this.isSidebarOpen}}
@@ -54,6 +61,7 @@ export default class ApplicationComponent extends Component {
@selectedPlace={{this.selectedPlace}}
@onSelect={{this.selectPlace}}
@onClose={{this.closeSidebar}}
@onBookmarkChange={{this.refreshBookmarks}}
/>
{{/if}}