ui/client/features/shell/domain/PaneSizing
Pure (DOMAIN-001): pane sizing math for the resizers (mouse and keyboard).
Cockpit client (features), next. Source: ui/client/features/shell/domain/PaneSizing.ts.
Functions#
clampSize()#
clampSize(
size,min,max):number
Defined in: ui/client/features/shell/domain/PaneSizing.ts:3
Parameters#
size
number
min
number
max
number
Returns#
number
resizeByKey()#
resizeByKey(
key,shiftKey,value,min,max,orientation,invert):number|null
Defined in: ui/client/features/shell/domain/PaneSizing.ts:22
Keyboard behaviour of a separator: arrows resize (Shift = big step),
Home/End jump to min/max. Returns null for keys the separator ignores.
orientation is the separator's: 'vertical' uses Left/Right, 'horizontal'
uses Up/Down (Up grows a bottom drawer).
Parameters#
key
string
shiftKey
boolean
value
number
min
number
max
number
orientation
"vertical" | "horizontal"
invert
boolean
Returns#
number | null
sizeFromDrag()#
sizeFromDrag(
start,delta,invert,min,max):number
Defined in: ui/client/features/shell/domain/PaneSizing.ts:11
New size after dragging the separator by delta px from where it started.
invert = the pane grows when the pointer moves toward the start (right
pane, bottom drawer).
Parameters#
start
number
delta
number
invert
boolean
min
number
max
number
Returns#
number