From 67923fca205ab8954e30abad31c7b1c45cec6872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Mon, 6 Jul 2020 08:25:36 +0200 Subject: [PATCH] :books: Update docstring --- common/uxbox/common/geom/shapes.cljc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/common/uxbox/common/geom/shapes.cljc b/common/uxbox/common/geom/shapes.cljc index c2e61e5455..a8be21c70a 100644 --- a/common/uxbox/common/geom/shapes.cljc +++ b/common/uxbox/common/geom/shapes.cljc @@ -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]