Skip to content

applyLayout

applyLayout(layout, existingInstances?): Map<InstanceId, VesselInstance>

Defined in: packages/client/src/lib/command-processor/layout-manager.ts:19

Converts a server layout into a Map of VesselInstances.

Pure function — no store dependency, no side effects. The caller is responsible for writing the result to state.

GridLayout | TilingLayout

The layout from the server response

Map<InstanceId, VesselInstance>

Current instances map, used by grid layout to preserve vesselId and variant (which GridPosition does not carry)

Map<InstanceId, VesselInstance>