Waypoints should be addable via context menus. In particular:
- The OnFieldContextMenu should have the ability to create a waypoint on the field.
- The WaypointContextMenu should allow the creation of a new waypoint immediately before or after it.
There's a couple caveats to these behaviors:
- Creating a waypoint on the field will require figuring out which path the waypoint should be added to (in the event there's multiple). I like the idea of adding it to the last active path with non-hidden waypoints, falling back to the last path if everything is hidden.
- Creating waypoints will also need to behave properly with folders. Adding a waypoint before or after should insert into the folder of the targeted waypoint, if such a folder exists. This can be done using selectOwnerFolder followed by findIndex in the folders slice. slice can be used to insert things into an array.
I've added TODOs to waypointsSlice, pathsSlice, and foldersSlice in the branch associated with this issue. Implement the relevant logic, then add buttons which call the appropriate actions to ContextMenu.tsx. Don't forget to add conditional visibility logic so that, for example, the option to add before/after only appears if only a single waypoint is selected.
Waypoints should be addable via context menus. In particular:
There's a couple caveats to these behaviors:
I've added TODOs to waypointsSlice, pathsSlice, and foldersSlice in the branch associated with this issue. Implement the relevant logic, then add buttons which call the appropriate actions to ContextMenu.tsx. Don't forget to add conditional visibility logic so that, for example, the option to add before/after only appears if only a single waypoint is selected.