Liking cljdoc? Tell your friends :D

baredom.components.x-scroll.model


attr-active-indexcljs

source

attr-auto-playcljs

source

attr-disabledcljs

source

attr-gapcljs

source

attr-intervalcljs

source

attr-labelcljs

source

attr-loopcljs

source

attr-modecljs

source

attr-show-controlscljs

source

attr-show-indicatorscljs

source

attr-snapcljs

source

can-go-next?cljs

(can-go-next? {:keys [active-index loop?]} child-count)

True when forward navigation is possible.

True when forward navigation is possible.
sourceraw docstring

can-go-prev?cljs

(can-go-prev? {:keys [active-index loop?]} child-count)

True when backward navigation is possible.

True when backward navigation is possible.
sourceraw docstring

change-detailcljs

(change-detail active-index previous-index)
source

clamp-indexcljs

(clamp-index idx child-count)

Clamp idx to [0, count-1] for non-loop mode.

Clamp idx to [0, count-1] for non-loop mode.
sourceraw docstring

crosses-boundary?cljs

(crosses-boundary? current-index target-index delta child-count)

True when navigating from current to target crosses the loop boundary.

True when navigating from current to target crosses the loop boundary.
sourceraw docstring

direction-for-deltacljs

(direction-for-delta delta)

Return "forward" for positive deltas, "backward" for negative.

Return "forward" for positive deltas, "backward" for negative.
sourceraw docstring

effective-loop?cljs

(effective-loop? loop? child-count)

True when loop is requested AND there are enough children.

True when loop is requested AND there are enough children.
sourceraw docstring

effective-offsetcljs

(effective-offset slide-index active-index child-count)

Compute the visual offset of slide-index relative to active-index in loop mode. Returns a value in [-floor(count/2), ceil(count/2)-1] so the active slide is at 0 and neighbors wrap around it.

Compute the visual offset of slide-index relative to active-index
in loop mode. Returns a value in [-floor(count/2), ceil(count/2)-1]
so the active slide is at 0 and neighbors wrap around it.
sourceraw docstring

end-detailcljs

(end-detail active-index)
source

event-changecljs

source

event-endcljs

source

event-loopcljs

source

event-schemacljs

source

event-startcljs

source

loop-detailcljs

(loop-detail direction)
source

loop-eligible?cljs

(loop-eligible? child-count)

Loop requires at least 3 children to avoid ambiguity.

Loop requires at least 3 children to avoid ambiguity.
sourceraw docstring

method-apicljs

source

normalizecljs

(normalize {:keys [mode-raw snap-raw loop-attr auto-play-attr interval-raw
                   show-controls-attr show-indicators-attr active-index-raw
                   gap-raw disabled-attr label-raw]})

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

Input keys: :mode-raw string | nil :snap-raw string | nil :loop-attr string | nil (hasAttribute) :auto-play-attr string | nil (hasAttribute) :interval-raw string | nil :show-controls-attr string | nil (getAttribute, nil=absent) :show-indicators-attr string | nil (hasAttribute) :active-index-raw string | nil :gap-raw string | nil :disabled-attr string | nil (hasAttribute) :label-raw string | nil

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

Input keys:
  :mode-raw               string | nil
  :snap-raw               string | nil
  :loop-attr              string | nil  (hasAttribute)
  :auto-play-attr         string | nil  (hasAttribute)
  :interval-raw           string | nil
  :show-controls-attr     string | nil  (getAttribute, nil=absent)
  :show-indicators-attr   string | nil  (hasAttribute)
  :active-index-raw       string | nil
  :gap-raw                string | nil
  :disabled-attr          string | nil  (hasAttribute)
  :label-raw              string | nil
sourceraw docstring

observed-attributescljs

source

parse-active-indexcljs

(parse-active-index s)

Parse active-index attribute. Default 0.

Parse active-index attribute. Default 0.
sourceraw docstring

parse-gapcljs

(parse-gap s)

Parse gap attribute. Default 0.

Parse gap attribute. Default 0.
sourceraw docstring

parse-intervalcljs

(parse-interval s)

Parse interval attribute. Default 5000, minimum 500.

Parse interval attribute. Default 5000, minimum 500.
sourceraw docstring

parse-modecljs

(parse-mode s)

Normalise mode attribute to "horizontal" or "vertical". Unknown / nil values fall back to "horizontal".

Normalise mode attribute to "horizontal" or "vertical".
Unknown / nil values fall back to "horizontal".
sourceraw docstring

parse-non-neg-intcljs

(parse-non-neg-int s default-val)

Parse a string to a non-negative integer, returning default-val on failure.

Parse a string to a non-negative integer, returning default-val on failure.
sourceraw docstring

parse-snapcljs

(parse-snap s)

Normalise snap attribute to "none", "start", "center", or "end". Unknown / nil values fall back to "none".

Normalise snap attribute to "none", "start", "center", or "end".
Unknown / nil values fall back to "none".
sourceraw docstring

property-apicljs

source

resolve-target-indexcljs

(resolve-target-index current-index delta child-count loop?)

Given a delta (+1 or -1), compute the target index. In loop mode wraps around; in non-loop mode clamps.

Given a delta (+1 or -1), compute the target index.
In loop mode wraps around; in non-loop mode clamps.
sourceraw docstring

slide-translatecljs

(slide-translate offset slide-size gap)

Compute pixel translation for a slide at the given offset.

Compute pixel translation for a slide at the given offset.
sourceraw docstring

snap-to-indexcljs

(snap-to-index position slide-size gap child-count)

Given a free-form drag position (in pixels), compute the nearest slide index to snap to. Returns clamped [0, count-1] index.

Given a free-form drag position (in pixels), compute the nearest
slide index to snap to. Returns clamped [0, count-1] index.
sourceraw docstring

start-detailcljs

(start-detail direction active-index)
source

tag-namecljs

source

wrap-indexcljs

(wrap-index idx count)

Wrap idx into valid range [0, count). Returns 0 when count <= 0.

Wrap idx into valid range [0, count). Returns 0 when count <= 0.
sourceraw docstring

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