mirror of
https://github.com/penpot/penpot.git
synced 2025-04-13 15:31:26 -05:00
📚 Update docstring
This commit is contained in:
parent
2ce4314bc3
commit
67923fca20
1 changed files with 14 additions and 0 deletions
|
@ -861,6 +861,20 @@
|
|||
;; For each attribute, if the value is the same in all shapes,
|
||||
;; wll take this value. If there is any shape that is different,
|
||||
;; the value of the attribute will be the keyword :multiple.
|
||||
;;
|
||||
;; Example:
|
||||
;; (def shapes [{:stroke-color "#ff0000'
|
||||
;; :stroke-width 3
|
||||
;; :x 1000 :y 2000}
|
||||
;; {:stroke-width "#ff0000'
|
||||
;; :stroke-width 5
|
||||
;; :x 1500 :y 2000}])
|
||||
;;
|
||||
;; (get-attrs-multi shapes [:stroke-color :stroke-width :fill-color])
|
||||
;; >>> {:stroke-color "#ff0000'
|
||||
;; :stroke-width :multiple
|
||||
;; :fill-color nil}
|
||||
;;
|
||||
(let [combine-value #(if (= %1 %2) %1 :multiple)
|
||||
|
||||
combine-values (fn [attrs shape values]
|
||||
|
|
Loading…
Add table
Reference in a new issue