PickInputBridge
Translates WWK's SelectDragCallback gestures into DrawEvents for stateMachine — the single entry point real user input reaches the draw engine through.
SelectDragCallback is defined once in commonMain by WWK itself and backed by a platform-specific gesture detector on every target (Android/JVM/JS/iOS), so this whole bridge is ordinary shared code — a host wires it up per-platform with one line: worldWindow.selectDragDetector.callback = pickInputBridge.
canMoveObjects arms WWK's drag machinery for two kinds of handle placemarks (see DrawLayer's KDoc): a vertex handle (tagged with DrawLayer.VERTEX_ID_KEY) and a midpoint handle (tagged with DrawLayer.EDGE_INDEX_KEY) — never for a whole polygon/polyline/marker. Dragging either still moves the placemark via WWK's own Movable.moveTo (harmless — DrawLayer rebuilds and replaces it right after, driven by the effect onObjectMoved has through stateMachine), but onObjectMoved/onObjectMovingFinished are what actually drive the draw engine, converting each step into DrawEvent.DragStart/DrawEvent.DragMove/DrawEvent.DragEnd.
The same two handle kinds exist on a shape that is still being drawn (see DrawLayer.DRAFT_POINT_INDEX_KEY): they carry an index into the draft instead of an entity/vertex id, and dragging them reshapes the draft (DrawEvent.DragStart.hitDraftPointIndex/DrawEvent.DragStart.hitDraftEdgeIndex).
The marker being edited has a move target too (see DrawLayer.MARKER_MOVE_KEY): dragging it moves the marker (DrawEvent.DragStart.hitMarker).
Grab offset (midpoint and marker drags). WWK drags a ground-clamped handle by snapping it straight to the cursor (toPosition is the terrain under the finger), keeping no memory of where on the handle it was grabbed, and a drag only starts once the finger has moved past the touch slop. So the first toPosition is already some distance — the grab point's offset from the handle's centre plus the slop — away from the handle. Passed through as-is, the new vertex would leap that far on the first move, and because it's a brand-new spike on the outline the whole shape visibly "grows" at once. Instead the offset between the handle (fromPosition, WWK's reference position for a Movable) and that first cursor position is remembered, and every later position is shifted back by it: the new vertex starts exactly where the handle was and then follows the finger, staying at the same distance from it. Vertex-handle drags are unchanged (they already move an existing point, not grow the shape).
A midpoint-handle drag needs a fresh VertexId only once it actually commits (at DragEnd — see DrawMode.Edit.ActiveDrag.NewVertex's KDoc for why nothing is inserted before then), so pendingNewVertexId is generated once at DragStart and carried across the gesture by this bridge, not regenerated on every step.
Functions
Must be true for onObjectPicked to ever fire — see SelectDragCallback's KDoc.