mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 15:43:25 +00:00
map context menu with coordinates, closes #149
This commit is contained in:
@@ -7,6 +7,7 @@ import MapPopupComponent from "./MapPopup.svelte";
|
||||
export type PopupItem<T = Waypoint | TrackPoint | any> = {
|
||||
item: T;
|
||||
fileId?: string;
|
||||
hide?: () => void;
|
||||
};
|
||||
|
||||
export class MapPopup {
|
||||
@@ -30,6 +31,8 @@ export class MapPopup {
|
||||
}
|
||||
|
||||
setItem(item: PopupItem | null) {
|
||||
if (item)
|
||||
item.hide = () => this.hide();
|
||||
this.item.set(item);
|
||||
if (item === null) {
|
||||
this.hide();
|
||||
|
Reference in New Issue
Block a user