Liking cljdoc? Tell your friends :D

baredom.components.x-scroll-parallax.model


attr-directioncljs

source

attr-disabledcljs

source

attr-easingcljs

source

attr-labelcljs

source

attr-sourcecljs

source

compute-fade-opacitycljs

(compute-fade-opacity progress fade-range)

Compute opacity for a child with data-opacity="fade". fade-range is a fraction of the viewport (e.g. 0.2 for 20%). Returns 1.0 when in the middle, fades to 0.0 at edges.

Compute opacity for a child with data-opacity="fade".
fade-range is a fraction of the viewport (e.g. 0.2 for 20%).
Returns 1.0 when in the middle, fades to 0.0 at edges.
sourceraw docstring

compute-parallax-offsetcljs

(compute-parallax-offset progress speed viewport-size initial-offset)

Compute the parallax translation in pixels for a child. progress: scroll progress [0,1] speed: parallax speed factor (1 = normal, 0 = fixed, etc.) viewport-size: viewport dimension in pixels initial-offset: data-offset value in pixels

Compute the parallax translation in pixels for a child.
progress:      scroll progress [0,1]
speed:         parallax speed factor (1 = normal, 0 = fixed, etc.)
viewport-size: viewport dimension in pixels
initial-offset: data-offset value in pixels
sourceraw docstring

compute-progresscljs

(compute-progress element-top element-height viewport-height)

Compute scroll progress [0,1] given element rect top, element height, and viewport height. 0 = element just entered at the bottom, 1 = element about to leave at the top.

Compute scroll progress [0,1] given element rect top, element height,
and viewport height.
0 = element just entered at the bottom, 1 = element about to leave at the top.
sourceraw docstring

compute-scalecljs

(compute-scale progress scale-min)

Compute scale for a child with data-scale="grow". scale-min is the minimum scale (e.g. 0.85). Returns 1.0 when centered (progress=0.5), scale-min at edges.

Compute scale for a child with data-scale="grow".
scale-min is the minimum scale (e.g. 0.85).
Returns 1.0 when centered (progress=0.5), scale-min at edges.
sourceraw docstring

data-offsetcljs

source

data-opacitycljs

source

data-scalecljs

source

data-speedcljs

source

event-entercljs

source

event-leavecljs

source

event-progresscljs

source

event-schemacljs

source

normalizecljs

(normalize {:keys [direction-raw source-raw easing-raw disabled-attr
                   label-raw]})

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

Input keys: :direction-raw string | nil :source-raw string | nil :easing-raw string | nil :disabled-attr string | nil (hasAttribute) :label-raw string | nil

Output keys: :direction string — "vertical" | "horizontal" :source string — "document" :easing string — "none" | "smooth" :disabled? boolean :label string

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

Input keys:
  :direction-raw  string | nil
  :source-raw     string | nil
  :easing-raw     string | nil
  :disabled-attr  string | nil  (hasAttribute)
  :label-raw      string | nil

Output keys:
  :direction  string — "vertical" | "horizontal"
  :source     string — "document"
  :easing     string — "none" | "smooth"
  :disabled?  boolean
  :label      string
sourceraw docstring

observed-attributescljs

source

parse-bool-attrcljs

(parse-bool-attr s)

Standard HTML boolean attribute: present (non-nil) = true, absent (nil) = false.

Standard HTML boolean attribute: present (non-nil) = true, absent (nil) = false.
sourceraw docstring

parse-directioncljs

(parse-direction s)

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

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

parse-easingcljs

(parse-easing s)

Normalise easing attribute to "none" or "smooth". Unknown / nil values fall back to "none".

Normalise easing attribute to "none" or "smooth".
Unknown / nil values fall back to "none".
sourceraw docstring

parse-offsetcljs

(parse-offset s)

Parse a data-offset string to a float. Default 0.

Parse a data-offset string to a float. Default 0.
sourceraw docstring

parse-sourcecljs

(parse-source s)

Normalise source attribute to "document". Unknown / nil values fall back to "document".

Normalise source attribute to "document".
Unknown / nil values fall back to "document".
sourceraw docstring

parse-speedcljs

(parse-speed s)

Parse a data-speed string to a float. Default 1.0.

Parse a data-speed string to a float. Default 1.0.
sourceraw docstring

progress-detailcljs

(progress-detail progress)
source

property-apicljs

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