mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-10 07:36:29 +00:00
crop
This commit is contained in:
1 parent
290f4d8c44
commit
e07ec97e12
5 files changed
+339
-39
No files matched your search
@@ -645,6 +645,16 @@ class Engine {
|
||||
return this.run((w) => w.reverse());
|
||||
}
|
||||
|
||||
/**
|
||||
* Keeps the trackpoints `start` to `end` (both included) of the selection, counted over its
|
||||
* segments one after the other, and removes the others, with the segments, tracks and files
|
||||
* that are left empty (tracks and files only if they are selected). Resolves to `false` when
|
||||
* the range covers the whole selection.
|
||||
*/
|
||||
crop(start: number, end: number) {
|
||||
return this.run((w) => w.crop(Math.max(start, 0), Math.max(end, 0)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes each selected segment (or the segments of the selected files and tracks) come back to
|
||||
* where it started: a reversed copy of it is added after its last trackpoint (which is not
|
||||
|
||||
Reference in new issue
Block a user