Liking cljdoc? Tell your friends :D

ty.positioning

Core positioning engine for floating elements. Adapted from toddler.popup positioning logic.

Core positioning engine for floating elements.
Adapted from toddler.popup positioning logic.
raw docstring

auto-updatecljs

(auto-update target-el floating-el update-fn config)

Create auto-update system for position tracking. Takes a config map with same options as find-best-position. Returns cleanup function.

Create auto-update system for position tracking.
Takes a config map with same options as find-best-position.
Returns cleanup function.
sourceraw docstring

calculate-placementcljs

(calculate-placement {:keys [target-rect floating-rect placement offset padding
                             scrollbar-width container-padding]})

Calculate position for a specific placement

Calculate position for a specific placement
sourceraw docstring

find-best-positioncljs

(find-best-position {:keys [target-el floating-el preferences offset padding
                            container-padding]
                     :or {offset 8
                          padding 8
                          container-padding 0
                          preferences (:default placement-preferences)}})

Find the best position for the floating element

Find the best position for the floating element
sourceraw docstring

get-element-rectcljs

(get-element-rect el)

Get element dimensions relative to viewport

Get element dimensions relative to viewport
sourceraw docstring

get-viewport-rectcljs

(get-viewport-rect)
source

placement-preferencescljs

source

placementscljs

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