diff --git a/app/components/map.gjs b/app/components/map.gjs index 14537d5..a922c1f 100644 --- a/app/components/map.gjs +++ b/app/components/map.gjs @@ -60,7 +60,7 @@ export default class MapComponent extends Component { // Create a vector source and layer for bookmarks this.bookmarkSource = new VectorSource(); - + const bookmarkStyleFunction = (feature) => { const originalPlace = feature.get('originalPlace'); let color = '#ffcc33'; // Default Yellow @@ -71,7 +71,7 @@ export default class MapComponent extends Component { originalPlace._listIds.length > 0 ) { // Find the first list color - // We need access to storage.lists. + // We need access to storage.lists. // Since this is inside setupMap, 'this' refers to the component instance. const firstListId = originalPlace._listIds[0]; const list = this.storage.lists.find((l) => l.id === firstListId); diff --git a/app/components/place-details.gjs b/app/components/place-details.gjs index bc405ef..f2dc19c 100644 --- a/app/components/place-details.gjs +++ b/app/components/place-details.gjs @@ -1,5 +1,4 @@ import Component from '@glimmer/component'; -import { fn } from '@ember/helper'; import { on } from '@ember/modifier'; import { htmlSafe } from '@ember/template'; import { humanizeOsmTag } from '../utils/format-text'; diff --git a/app/components/place-lists-manager.gjs b/app/components/place-lists-manager.gjs index a41e7a8..7d40a88 100644 --- a/app/components/place-lists-manager.gjs +++ b/app/components/place-lists-manager.gjs @@ -3,7 +3,7 @@ import { service } from '@ember/service'; import { action } from '@ember/object'; import { on } from '@ember/modifier'; import { fn } from '@ember/helper'; -import Icon from './icon'; +import { htmlSafe } from '@ember/template'; import onClickOutside from '../modifiers/on-click-outside'; export default class PlaceListsManager extends Component { @@ -17,6 +17,10 @@ export default class PlaceListsManager extends Component { return this.args.place._listIds || []; } + styleFor(color) { + return htmlSafe(`background-color: ${color}`); + } + @action isInList(list) { if (!this.placeListIds) return false; @@ -59,10 +63,7 @@ export default class PlaceListsManager extends Component { }