Liking cljdoc? Tell your friends :D

baredom.components.x-split-pane.model

Pure model layer for x-split-pane — a resizable two-panel layout.

No DOM, no side effects. Every function here is a plain data transform and is exercised directly by model_test.cljs with sparse inputs.

Pure model layer for x-split-pane — a resizable two-panel layout.

No DOM, no side effects. Every function here is a plain data transform
and is exercised directly by model_test.cljs with sparse inputs.
raw docstring

attr-disabledcljs

source

attr-divider-labelcljs

source

attr-min-endcljs

source

attr-min-startcljs

source

attr-orientationcljs

source

attr-positioncljs

source

clampcljs

(clamp n lo hi)

Clamp n into the inclusive range [lo, hi].

Clamp `n` into the inclusive range [lo, hi].
sourceraw docstring

clamp-by-minscljs

(clamp-by-mins percent container-px min-start-px min-end-px)

Clamp a position percentage so the start pane stays >= min-start-px and the end pane stays >= min-end-px, given the container's px size. When the two minimums overlap (no feasible position satisfies both) a clamped midpoint of the conflicting range is returned so the result stays deterministic and within [0,100].

Clamp a position percentage so the start pane stays >= `min-start-px`
and the end pane stays >= `min-end-px`, given the container's px size.
When the two minimums overlap (no feasible position satisfies both)
a clamped midpoint of the conflicting range is returned so the result
stays deterministic and within [0,100].
sourceraw docstring

clamp-positioncljs

(clamp-position n)

Clamp a position percentage into [0, 100].

Clamp a position percentage into [0, 100].
sourceraw docstring

default-divider-labelcljs

source

default-orientationcljs

source

default-positioncljs

source

event-resizecljs

source

event-resize-endcljs

source

event-schemacljs

source

keyboard-deltacljs

(keyboard-delta key orientation)

Map a keyboard key to a position change for the given orientation. Increasing the position grows the start pane. Returns a numeric percentage delta, the keyword :to-min or :to-max, or nil when the key is not a resize key.

Map a keyboard `key` to a position change for the given `orientation`.
Increasing the position grows the start pane. Returns a numeric
percentage delta, the keyword :to-min or :to-max, or nil when the key
is not a resize key.
sourceraw docstring

keyboard-page-stepcljs

source

keyboard-stepcljs

source

max-positioncljs

source

method-apicljs

source

min-positioncljs

source

next-positioncljs

(next-position current delta)

Compute the next position from current and a keyboard-delta result. delta is a numeric percentage, :to-min, or :to-max. The result is clamped to [0, 100].

Compute the next position from `current` and a `keyboard-delta` result.
`delta` is a numeric percentage, :to-min, or :to-max. The result is
clamped to [0, 100].
sourceraw docstring

normalizecljs

(normalize {:keys [orientation-raw position-raw min-start-raw min-end-raw
                   disabled? divider-label-raw]})

Normalise raw attribute inputs into a stable view-model map.

Input keys: :orientation-raw string | nil :position-raw string | nil :min-start-raw string | nil :min-end-raw string | nil :disabled? boolean :divider-label-raw string | nil

Output keys: :orientation "horizontal" | "vertical" :position number 0–100 :min-start number >= 0 (px) :min-end number >= 0 (px) :disabled? boolean :divider-label non-empty string

Normalise raw attribute inputs into a stable view-model map.

Input keys:
  :orientation-raw    string | nil
  :position-raw       string | nil
  :min-start-raw      string | nil
  :min-end-raw        string | nil
  :disabled?          boolean
  :divider-label-raw  string | nil

Output keys:
  :orientation   "horizontal" | "vertical"
  :position      number 0–100
  :min-start     number >= 0 (px)
  :min-end       number >= 0 (px)
  :disabled?     boolean
  :divider-label non-empty string
sourceraw docstring

observed-attributescljs

source

orientation-horizontalcljs

source

orientation-verticalcljs

source

parse-mincljs

(parse-min s)

Parse a min-start / min-end attribute into a non-negative pixel count.

Parse a `min-start` / `min-end` attribute into a non-negative pixel count.
sourceraw docstring

parse-numbercljs

(parse-number s default-val)

Parse a numeric attribute string, falling back to default-val for nil / non-string / non-numeric input.

Parse a numeric attribute string, falling back to `default-val` for
nil / non-string / non-numeric input.
sourceraw docstring

parse-orientationcljs

(parse-orientation s)

Parse the orientation attribute. Unknown / nil fall back to horizontal.

Parse the `orientation` attribute. Unknown / nil fall back to horizontal.
sourceraw docstring

parse-positioncljs

(parse-position s)

Parse the position attribute into a clamped percentage 0–100.

Parse the `position` attribute into a clamped percentage 0–100.
sourceraw docstring

pointer->percentcljs

(pointer->percent client rect-start rect-size)

Convert a pointer client coordinate to a percentage of the container. client is clientX (horizontal split) or clientY (vertical split); rect-start is the container's left/top edge and rect-size its width/height in px. The result is clamped to [0, 100].

Convert a pointer client coordinate to a percentage of the container.
`client` is clientX (horizontal split) or clientY (vertical split);
`rect-start` is the container's left/top edge and `rect-size` its
width/height in px. The result is clamped to [0, 100].
sourceraw docstring

property-apicljs

source

slot-endcljs

source

slot-startcljs

source

tag-namecljs

source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close