mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-12-03 02:12:12 +00:00
fix embedding + playground
This commit is contained in:
@@ -22,6 +22,7 @@ export class StartEndMarkers {
|
||||
this.start = new mapboxgl.Marker({ element: startElement });
|
||||
this.end = new mapboxgl.Marker({ element: endElement });
|
||||
|
||||
map.onLoad(() => this.update());
|
||||
this.unsubscribes.push(gpxStatistics.subscribe(this.updateBinded));
|
||||
this.unsubscribes.push(slicedGPXStatistics.subscribe(this.updateBinded));
|
||||
this.unsubscribes.push(currentTool.subscribe(this.updateBinded));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TrackPoint, Waypoint } from 'gpx';
|
||||
import mapboxgl from 'mapbox-gl';
|
||||
import { mount, tick } from 'svelte';
|
||||
import { mount, tick, unmount } from 'svelte';
|
||||
import { get, writable, type Writable } from 'svelte/store';
|
||||
import MapPopupComponent from '$lib/components/map/MapPopup.svelte';
|
||||
|
||||
@@ -69,7 +69,7 @@ export class MapPopup {
|
||||
|
||||
remove() {
|
||||
this.popup.remove();
|
||||
this.component.$destroy();
|
||||
unmount(this.component);
|
||||
}
|
||||
|
||||
getCoordinates() {
|
||||
|
||||
Reference in New Issue
Block a user