Liking cljdoc? Tell your friends :D

album-layout.subs


aspect-weightcljs

(aspect-weight a)
source

compute-layoutcljs

(compute-layout items window-base)

Given a sequence of items and the window dimensions, return a sequence of sequences containing item entries laid out according to the partition algorithm.

Given a sequence of items and the window dimensions, return a sequence of
sequences containing item entries laid out according to the partition
algorithm.
sourceraw docstring

compute-partitionscljs

(compute-partitions aspects num-rows)

Given a sequence of item aspects and the number of rows, return a sequence of rows, each of which is a sequence of item aspects whose sum is as equal as possible to the sums of other rows.

Given a sequence of item aspects and the number of rows, return
a sequence of rows, each of which is a sequence of item aspects
whose sum is as equal as possible to the sums of other rows.
sourceraw docstring

compute-rowscljs

(compute-rows {:keys [width height]} items)

Given the window dimensions and a sequence of item aspect ratios, return the ideal number of rows for the gallery layout.

Given the window dimensions and a sequence of item aspect ratios,
return the ideal number of rows for the gallery layout.
sourceraw docstring

fill-partitionscljs

(fill-partitions partitions items)

Replace each aspect ratio in the partition sequence with an item of the same aspect ratio. Each item is used only once.

Replace each aspect ratio in the partition sequence with an item of the
same aspect ratio. Each item is used only once.
sourceraw docstring

item-aspectcljs

(item-aspect [id {:keys [aspect]}])
source

item-weightcljs

(item-weight i)
source

row-scale-factorcljs

(row-scale-factor row-width row-height items)

Given the row width, ideal row height, and a sequence of items, return the scale factor s, where the actual row height is given by multiplying the ideal row height by s.

Given the row width, ideal row height, and a sequence of items,
return the scale factor s, where the actual row height is given
by multiplying the ideal row height by s.
sourceraw docstring

scale-layoutcljs

(scale-layout {:keys [box] :as window} layout)

Return a layout which contains explicit dimensions for items.

Return a layout which contains explicit dimensions for items.
sourceraw docstring

scale-rowcljs

(scale-row row-width row-height items)

Given the row dimensions and a sequence of items, return a new sequence of items which have :width, :height keys. These items are scaled so that the sum of their widths is equal to the the row width.

Given the row dimensions and a sequence of items, return a new
sequence of items which have :width, :height keys. These items
are scaled so that the sum of their widths is equal to the the row width.
sourceraw docstring

total-widthcljs

(total-width target-height items)
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close