Leaflet Partially Editable Polyline - Multiple polylines
Click a line to edit it. Each polyline is an independent editor, so switching to another one is up to the application:
it ends the current session and starts the next.
Click elsewhere on the map to stop editing.
A locked route has editing disabled, and clicking it is refused.