ActiveDrag

sealed interface ActiveDrag

What an in-progress drag inside Draw is doing.

Inheritors

Types

Link copied to clipboard
data class InsertingPoint(val edgeIndex: Int, val position: GeoPosition) : DrawMode.Draw.ActiveDrag

A midpoint handle on edge edgeIndex is being dragged into a new point. Like Edit.ActiveDrag.NewVertex, pendingVertices is NOT touched while dragging — position only drives a live preview — and the point is inserted (after point edgeIndex) once, at the end of the drag.

Link copied to clipboard
data class MovingPoint(val index: Int, val origin: GeoPosition) : DrawMode.Draw.ActiveDrag

The point at index in pendingVertices is being repositioned (it follows the drag live). origin is where it was when the drag began: the "before" of the one undo step recorded when the drag ends.