Liking cljdoc? Tell your friends :D

baredom.components.x-image.model


attr-altcljs

source

attr-decorativecljs

source

attr-fitcljs

source

attr-loadingcljs

source

attr-positioncljs

source

attr-ratiocljs

source

attr-srccljs

source

default-fitcljs

source

default-loadingcljs

source

default-positioncljs

source

error-detailcljs

(error-detail src)

Build the event detail map for x-image-error.

Build the event detail map for x-image-error.
sourceraw docstring

event-errorcljs

source

event-loadcljs

source

event-schemacljs

source

load-detailcljs

(load-detail src natural-w natural-h)

Build the event detail map for x-image-load.

Build the event detail map for x-image-load.
sourceraw docstring

normalizecljs

(normalize {:keys [src-raw alt-raw alt-present? decorative-present? ratio-raw
                   fit-raw position-raw loading-raw]})

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

Input keys: :src-raw string | nil :alt-raw string | nil :alt-present? boolean :decorative-present? boolean :ratio-raw string | nil :fit-raw string | nil :position-raw string | nil :loading-raw string | nil

Output keys: :src string | nil (sanitized; nil when absent/unsafe) :alt string ("" when decorative or absent) :decorative? boolean :ratio-css string | nil ("16 / 9" or nil) :ratio-valid? boolean :fit string (one of fit-values) :position string :loading string ("lazy" | "eager") :warn-alt? boolean (true iff non-decorative AND alt attribute absent)

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

Input keys:
  :src-raw             string | nil
  :alt-raw             string | nil
  :alt-present?        boolean
  :decorative-present? boolean
  :ratio-raw           string | nil
  :fit-raw             string | nil
  :position-raw        string | nil
  :loading-raw         string | nil

Output keys:
  :src          string | nil   (sanitized; nil when absent/unsafe)
  :alt          string         ("" when decorative or absent)
  :decorative?  boolean
  :ratio-css    string | nil   ("16 / 9" or nil)
  :ratio-valid? boolean
  :fit          string         (one of fit-values)
  :position     string
  :loading      string         ("lazy" | "eager")
  :warn-alt?    boolean        (true iff non-decorative AND alt attribute absent)
sourceraw docstring

observed-attributescljs

source

parse-fitcljs

(parse-fit s)

Normalise fit attribute. Unknown / nil fall back to "cover".

Normalise fit attribute. Unknown / nil fall back to "cover".
sourceraw docstring

parse-loadingcljs

(parse-loading s)

Normalise loading attribute. Unknown / nil fall back to "lazy".

Normalise loading attribute. Unknown / nil fall back to "lazy".
sourceraw docstring

parse-positioncljs

(parse-position s)

Normalise object-position. Non-empty trimmed string or "center".

Normalise object-position. Non-empty trimmed string or "center".
sourceraw docstring

parse-ratiocljs

(parse-ratio s)

Parse a ratio string like "16:9" or "16/9" into a CSS aspect-ratio value. Returns {:css <string|nil> :valid? <boolean>}.

  • nil / "" / "auto" → {:css nil :valid? true} (no explicit ratio)
  • valid ratio → {:css "16 / 9" :valid? true}
  • invalid → {:css nil :valid? false}
Parse a ratio string like "16:9" or "16/9" into a CSS aspect-ratio value.
Returns {:css <string|nil> :valid? <boolean>}.
  - nil / "" / "auto" → {:css nil :valid? true} (no explicit ratio)
  - valid ratio           → {:css "16 / 9" :valid? true}
  - invalid              → {:css nil :valid? false}
sourceraw docstring

property-apicljs

source

safe-srccljs

(safe-src s)

Return sanitized src, or nil when absent/unsafe.

Return sanitized src, or nil when absent/unsafe.
sourceraw docstring

state-errorcljs

source

state-loadedcljs

source

state-loadingcljs

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