mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-19 17:22:12 +00:00
split
This commit is contained in:
1 parent
e07ec97e12
commit
24b877c4ee
8 files changed
+532
-180
No files matched your search
@@ -20,7 +20,7 @@ import { isSegmentHidden, isWaypointHidden } from '$lib/file-visibility';
|
||||
import { settings } from '$lib/logic/settings';
|
||||
import { currentTool, Tool } from '$lib/components/toolbar/tools';
|
||||
import { fileActions } from '$lib/logic/file-actions';
|
||||
import { splitAs } from '$lib/components/toolbar/tools/scissors/scissors';
|
||||
import { splitAtPoint } from '$lib/components/toolbar/tools/scissors/scissors';
|
||||
import { mapCursor, MapCursorState } from '$lib/logic/map-cursor';
|
||||
import { ANCHOR_LAYER_KEY } from '$lib/components/map/style';
|
||||
|
||||
@@ -415,7 +415,7 @@ export class GPXLayer {
|
||||
|
||||
layerOnClick(e: MapLayerMouseEvent) {
|
||||
const properties = e.features![0].properties!;
|
||||
const { trackId, segmentId, trackIndex, segmentIndex } = properties;
|
||||
const { trackId, segmentId } = properties;
|
||||
const selectionType = this.selectionState.type;
|
||||
|
||||
if (
|
||||
@@ -436,11 +436,7 @@ export class GPXLayer {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO the engine can split (Command::Split) but needs the index of the trackpoint
|
||||
// fileActions.split(get(splitAs), this.fileId, trackIndex, segmentIndex, {
|
||||
// lat: e.lngLat.lat,
|
||||
// lon: e.lngLat.lng,
|
||||
// });
|
||||
splitAtPoint(segmentId, { lng: e.lngLat.lng, lat: e.lngLat.lat });
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user