mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-22 17:32:12 +00:00
finish reworking immer updates
This commit is contained in:
1 parent
8643abfafa
commit
76b41dc546
7 files changed
+96
-116
No files matched your search
@@ -35,7 +35,6 @@
|
||||
import { flyAndScale } from '$lib/utils';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
import { TrackPoint } from 'gpx';
|
||||
import { produce } from 'immer';
|
||||
|
||||
export let popup: mapboxgl.Popup;
|
||||
export let popupElement: HTMLElement;
|
||||
|
||||
@@ -413,7 +413,7 @@ export class RoutingControls {
|
||||
if (file.trk.length === 0) {
|
||||
let track = new Track();
|
||||
track.replaceTrackPoints(0, 0, 0, [newPoint]);
|
||||
file.replaceTracks(0, 0, [track])[0];
|
||||
file.replaceTracks(0, 0, [track]);
|
||||
} else if (file.trk[trackIndex].trkseg.length === 0) {
|
||||
let segment = new TrackSegment();
|
||||
segment.replaceTrackPoints(0, 0, [newPoint]);
|
||||
|
||||
Reference in new issue
Block a user