Side to expand/shrink to.
This can be negative to expand the frames instead (e.g. when collapsing a docked frame).
OptionalallowOutOfBounds?: booleanAllow the resize span to exceed window bounds.
OptionalpinnedEdgeCoordinates?: number[]Frame IDs whose position and size must not change. Must be a subset of frameIds.
OptionalskipMinSizeCheck?: booleanSkip the per-frame min size check. Frames may shrink very small but not to 0 or below.
Returns a LayoutChange with the information necessary to redistribute frames to expand/shrink a certain amount towards the given side.
Changes can be applied to a window with applyFrameChanges.
While it checks for bounds/space issues (unless allowOutOfBounds is true), it does not check that all the frames correctly share/fill the start/end edges.
If you try to resize a layout like this to the right, you will get issues with frame edges not lining up as frame B would be resized less than A. If you had a frame at the empty space that you excluded, it's right edge would no longer align with B's.
See framesRedistributeFix for the helper that is used internally to get around this.
┌────────────┐ │A │ └──┬─────────┤ │B │ └─────────┘
Also note that it automatically excludes all collapsed frames without an area (height or width === 0).
Pinned Edges
Pinned edges will not be moved, space will be redistributed amongst remaining space. If doing this would cause edges to get "flipped", function will return LAYOUT_ERROR.REDISTRIBUTE_WOULD_RESULT_IN_INVALID_FRAMES.
┌──┬──────────────┐ │ │ │ │ ├──────────┬───┤ │ │ │ │ │ │ │ │ └──┴──────────┴───┘