Liking cljdoc? Tell your friends :D

baredom.components.x-drag-panel.model


attr-auto-scrollcljs

source

attr-disabledcljs

source

attr-grabcljs

source

attr-kindcljs

source

attr-labelcljs

source

attr-pendingcljs

source

attr-valuecljs

source

auto-scroll-autocljs

source

auto-scroll-nonecljs

source

axis-velocitycljs

(axis-velocity {:keys [pos lo hi max-speed]})

Auto-scroll speed in pixels per second along one axis.

pos is the pointer coordinate and lo/hi the container's edges on that axis. Negative scrolls toward lo, positive toward hi, zero between the two bands. Called once per axis because the vertical and horizontal scrollers are resolved independently — a board scrolls sideways while its columns scroll down, and a drag into a corner needs both.

Auto-scroll speed in pixels per second along one axis.

`pos` is the pointer coordinate and `lo`/`hi` the container's edges on that
axis. Negative scrolls toward `lo`, positive toward `hi`, zero between the two
bands. Called once per axis because the vertical and horizontal scrollers are
resolved independently — a board scrolls sideways while its columns scroll
down, and a drag into a corner needs both.
sourceraw docstring

default-labelcljs

source

drag-cancel-detailcljs

(drag-cancel-detail kind value reason)

Build the x-drag-panel-drag-cancel CustomEvent detail.

Build the x-drag-panel-drag-cancel CustomEvent detail.
sourceraw docstring

drag-deltacljs

(drag-delta {:keys [start-x start-y] :as drag})

Translation to apply to the lifted surface, relative to where it started.

Translation to apply to the lifted surface, relative to where it started.
sourceraw docstring

drag-positioncljs

(drag-position {:keys [pointer-x pointer-y offset-x offset-y]})

Panel top-left for a pointer at {:pointer-x :pointer-y}, given the grab offset captured at pointerdown. Returns {:x :y} in viewport coordinates.

The lifted position is never stored — it is derived from the drag value, so there is exactly one answer to "where is the panel" at any moment.

Panel top-left for a pointer at `{:pointer-x :pointer-y}`, given the grab
offset captured at pointerdown. Returns `{:x :y}` in viewport coordinates.

The lifted position is never stored — it is derived from the drag value, so
there is exactly one answer to "where is the panel" at any moment.
sourceraw docstring

drag-start-detailcljs

(drag-start-detail kind value)

Build the x-drag-panel-drag-start CustomEvent detail.

Build the x-drag-panel-drag-start CustomEvent detail.
sourceraw docstring

edge-bandcljs

(edge-band dimension)

Width of the auto-scroll trigger band for a container dimension.

Width of the auto-scroll trigger band for a container dimension.
sourceraw docstring

event-drag-cancelcljs

source

event-drag-startcljs

source

event-schemacljs

source

grab-handlecljs

source

grab-surfacecljs

source

long-press-mscljs

source

long-press-required?cljs

(long-press-required? {:keys [pointer-type grab]})

True when a press must be held before it arms a drag.

Only touch pointers in surface grab mode: the grab area is the whole panel, so arming immediately would need touch-action: none across it and the user could no longer scroll the board by swiping over a card. Mouse and pen have no such conflict, and handle mode targets a small deliberate strip.

True when a press must be held before it arms a drag.

Only touch pointers in surface grab mode: the grab area is the whole panel, so
arming immediately would need `touch-action: none` across it and the user could
no longer scroll the board by swiping over a card. Mouse and pen have no such
conflict, and handle mode targets a small deliberate strip.
sourceraw docstring

long-press-slopcljs

source

method-apicljs

source

normalizecljs

(normalize {:keys [kind-raw value-raw label-raw grab-raw auto-scroll-raw
                   disabled-present? pending-present?]})

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

Input keys: :kind-raw string | nil :value-raw string | nil :label-raw string | nil :grab-raw string | nil :auto-scroll-raw string | nil :disabled-present? boolean :pending-present? boolean

Output keys: :kind string :value string :label string :grab string (grab-handle | grab-surface) :auto-scroll string (auto-scroll-auto | auto-scroll-none) :disabled? boolean :pending? boolean :draggable? boolean

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

Input keys:
  :kind-raw          string | nil
  :value-raw         string | nil
  :label-raw         string | nil
  :grab-raw          string | nil
  :auto-scroll-raw   string | nil
  :disabled-present? boolean
  :pending-present?  boolean

Output keys:
  :kind         string
  :value        string
  :label        string
  :grab         string  (grab-handle | grab-surface)
  :auto-scroll  string  (auto-scroll-auto | auto-scroll-none)
  :disabled?    boolean
  :pending?     boolean
  :draggable?   boolean
sourceraw docstring

normalize-auto-scrollcljs

(normalize-auto-scroll raw)

Normalize the raw auto-scroll attribute to auto-scroll-none or auto-scroll-auto. Unrecognised values fall back to auto-scroll-auto, because a board deeper than the viewport is close to unusable without it.

Normalize the raw auto-scroll attribute to `auto-scroll-none` or
`auto-scroll-auto`. Unrecognised values fall back to `auto-scroll-auto`,
because a board deeper than the viewport is close to unusable without it.
sourceraw docstring

normalize-grabcljs

(normalize-grab raw)

Normalize the raw grab attribute to grab-surface or grab-handle.

Anything unrecognised falls back to grab-handle deliberately: handle mode is the conservative choice, since surface mode swallows presses on interactive content inside the panel body.

Normalize the raw grab attribute to `grab-surface` or `grab-handle`.

Anything unrecognised falls back to `grab-handle` deliberately: handle mode is
the conservative choice, since surface mode swallows presses on interactive
content inside the panel body.
sourceraw docstring

normalize-labelcljs

(normalize-label raw)

Normalize the raw label attribute. Falls back to default-label.

Normalize the raw label attribute. Falls back to default-label.
sourceraw docstring

normalize-textcljs

(normalize-text raw)

Normalize a raw free-text attribute (kind, value) to a string. Absent and blank collapse to the empty string so downstream comparisons never have to distinguish nil from "".

Normalize a raw free-text attribute (`kind`, `value`) to a string.
Absent and blank collapse to the empty string so downstream comparisons never
have to distinguish nil from "".
sourceraw docstring

observed-attributescljs

source

part-bodycljs

source

part-gripcljs

source

part-handlecljs

source

part-panelcljs

source

pointer-touchcljs

source

property-apicljs

source

reason-escapecljs

source

reason-no-zonecljs

source

scroll-deltacljs

(scroll-delta velocity dt-ms)

Pixels to scroll this frame for velocity px/sec over dt-ms milliseconds.

Frame-delta driven rather than per-frame constant, so the result does not double on a 120Hz display.

Pixels to scroll this frame for `velocity` px/sec over `dt-ms` milliseconds.

Frame-delta driven rather than per-frame constant, so the result does not
double on a 120Hz display.
sourceraw docstring

scroll-edge-maxcljs

source

scroll-edge-ratiocljs

source

scroll-max-speedcljs

source

tag-namecljs

source

travelled?cljs

(travelled? {:keys [start-x start-y pointer-x pointer-y slop]})

True when a pointer has moved beyond slop pixels from its press origin.

Used to cancel a pending long-press: travel before the timer fires is a scroll gesture, not a drag.

True when a pointer has moved beyond `slop` pixels from its press origin.

Used to cancel a pending long-press: travel before the timer fires is a scroll
gesture, not a drag.
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