diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options/group.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options/group.cljs index 31b1cbf83..d870ff216 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/group.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/group.cljs @@ -38,7 +38,25 @@ type (:type shape) ; always be :group measure-values - (select-keys shape measure-attrs) + (merge + ;; All values extracted from the group shape, except + ;; border radius, that needs to be looked up from children + (geom/get-attrs-multi (map #(get-shape-attrs + % + measure-attrs + nil + nil + nil) + [shape]) + measure-attrs) + (geom/get-attrs-multi (map #(get-shape-attrs + % + [:rx :ry] + nil + nil + nil) + shape-with-children) + [:rx :ry])) fill-values (geom/get-attrs-multi shape-with-children fill-attrs) @@ -114,6 +132,7 @@ text-transform-attrs)] [:* [:& measures-menu {:ids [id] + :ids-with-children ids-with-children :type type :values measure-values}] [:& fill-menu {:ids ids-with-children diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options/measures.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options/measures.cljs index 5d60fb32a..448cc6641 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/measures.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/measures.cljs @@ -35,10 +35,12 @@ ;; -- User/drawing coords (mf/defc measures-menu - [{:keys [options ids values] :as props}] + [{:keys [options ids ids-with-children values] :as props}] (let [options (or options #{:size :position :rotation :radius}) locale (i18n/use-locale) + ids-with-children (or ids-with-children ids) + old-shapes (deref (refs/objects-by-id ids)) frames (map #(deref (refs/object-by-id (:frame-id %))) old-shapes) shapes (map gsh/transform-shape frames old-shapes) @@ -93,8 +95,8 @@ (let [value (-> (dom/get-target event) (dom/get-value) (d/parse-integer 0))] - (st/emit! (dwc/update-shapes-recursive - ids + (st/emit! (dwc/update-shapes + ids-with-children #(if (:rx %) (assoc % :rx value :ry value) %)))))