Liking cljdoc? Tell your friends :D

baredom.components.x-scroll-stack.model


attr-aligncljs

source

attr-disabledcljs

source

attr-peekcljs

source

attr-rotationcljs

source

attr-scroll-distancecljs

source

card-rotationcljs

(card-rotation index max-rotation)

Deterministic rotation for card at index. Uses sin for pseudo-random spread.

Deterministic rotation for card at index. Uses sin for pseudo-random spread.
sourceraw docstring

card-x-offsetcljs

(card-x-offset index)

Small horizontal jitter for the 'messy stack' feel.

Small horizontal jitter for the 'messy stack' feel.
sourceraw docstring

change-detailcljs

(change-detail stacked-count total-count progress)
source

compute-card-progresscljs

(compute-card-progress scroll-offset card-index scroll-distance)

For a given scroll offset, compute the stacking progress [0.0, 1.0] of card i. Card i begins its transition at i*sd and completes at (i+1)*sd.

For a given scroll offset, compute the stacking progress [0.0, 1.0] of card i.
Card i begins its transition at i*sd and completes at (i+1)*sd.
sourceraw docstring

compute-overall-progresscljs

(compute-overall-progress scroll-offset child-count scroll-distance)

Returns [0.0, 1.0] for how far through the total stacking the user has scrolled.

Returns [0.0, 1.0] for how far through the total stacking the user has scrolled.
sourceraw docstring

compute-stack-area-ycljs

(compute-stack-area-y container-h total-stack-h align)

Compute the Y position of the stack area top within the container. container-h: container height (viewport), total-stack-h: sum of peeks + last card height, align: "top" | "center" | "bottom".

Compute the Y position of the stack area top within the container.
container-h: container height (viewport), total-stack-h: sum of peeks + last card height,
align: "top" | "center" | "bottom".
sourceraw docstring

compute-stacked-countcljs

(compute-stacked-count scroll-offset child-count scroll-distance)

Returns the integer count of fully stacked cards.

Returns the integer count of fully stacked cards.
sourceraw docstring

event-changecljs

source

event-progresscljs

source

event-schemacljs

source

normalizecljs

(normalize {:keys [peek-raw rotation-raw scroll-distance-raw align-raw
                   disabled-attr]})

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

Input keys: :peek-raw string | nil :rotation-raw string | nil :scroll-distance-raw string | nil :align-raw string | nil :disabled-attr string | nil

Output keys: :peek number :rotation number :scroll-distance number :align string :disabled? boolean

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

Input keys:
  :peek-raw             string | nil
  :rotation-raw         string | nil
  :scroll-distance-raw  string | nil
  :align-raw            string | nil
  :disabled-attr        string | nil

Output keys:
  :peek             number
  :rotation         number
  :scroll-distance  number
  :align            string
  :disabled?        boolean
sourceraw docstring

observed-attributescljs

source

parse-aligncljs

(parse-align s)

Parse align attribute. Returns "top", "center", or "bottom".

Parse align attribute. Returns "top", "center", or "bottom".
sourceraw docstring

parse-bool-attrcljs

(parse-bool-attr s)

Parse a boolean attribute (present = true).

Parse a boolean attribute (present = true).
sourceraw docstring

parse-positive-numbercljs

(parse-positive-number s default)

Parse a string to a positive number, returning default on failure.

Parse a string to a positive number, returning default on failure.
sourceraw docstring

progress-detailcljs

(progress-detail progress stacked-count total-count)
source

property-apicljs

source

stack-paramscljs

(stack-params card-index peek max-rotation)

Returns {:stack-y :stack-rot :stack-x} for a card when fully stacked. stack-y is the peek offset (relative to stack top) for card at index.

Returns {:stack-y :stack-rot :stack-x} for a card when fully stacked.
stack-y is the peek offset (relative to stack top) for card at index.
sourceraw docstring

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