duplicate any selection

This commit is contained in:
vcoppe
2024-05-23 14:44:07 +02:00
parent 8b5d1f1fbf
commit 6cbf9a3248
7 changed files with 153 additions and 40 deletions

View File

@@ -189,12 +189,16 @@ export class ListTrackItem extends ListItem {
return this.fileId;
}
extend(id: number): ListSegmentItem {
return new ListSegmentItem(this.fileId, this.trackIndex, id);
getTrackIndex(): number {
return this.trackIndex;
}
extend(id: number): ListTrackSegmentItem {
return new ListTrackSegmentItem(this.fileId, this.trackIndex, id);
}
}
export class ListSegmentItem extends ListItem {
export class ListTrackSegmentItem extends ListItem {
fileId: string;
trackIndex: number;
segmentIndex: number;
@@ -227,7 +231,15 @@ export class ListSegmentItem extends ListItem {
return this.fileId;
}
extend(): ListSegmentItem {
getTrackIndex(): number {
return this.trackIndex;
}
getSegmentIndex(): number {
return this.segmentIndex;
}
extend(): ListTrackSegmentItem {
return this;
}
}
@@ -295,6 +307,10 @@ export class ListWaypointItem extends ListItem {
return this.fileId;
}
getWaypointIndex(): number {
return this.waypointIndex;
}
extend(): ListWaypointItem {
return this;
}