Function: migrateV1toV2()
ts
function migrateV1toV2(state): ViewerStateV2;Defined in: serialization/ViewerState.ts:401
Deterministically migrate the legacy v1 schema.
Missing or non-finite LayerState.order values use the legacy default of 0; source-array position is the stable tie-breaker. Legacy selection contains pane focus and is never promoted. The sole legacy scientific-selection rule is a visible crosshair whose mode is exactly "selection", whose surface ID is non-empty, and whose vertex index is a non-negative integer.