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.
Parameters
Section titled “Parameters”layout
Section titled “layout”GridLayout | TilingLayout
The layout from the server response
existingInstances?
Section titled “existingInstances?”Map<InstanceId, VesselInstance>
Current instances map, used by grid layout to preserve vesselId and variant (which GridPosition does not carry)
Returns
Section titled “Returns”Map<InstanceId, VesselInstance>