diff --git a/common/app/common/pages.cljc b/common/app/common/pages.cljc index a93604229..4a7f79772 100644 --- a/common/app/common/pages.cljc +++ b/common/app/common/pages.cljc @@ -217,7 +217,7 @@ (s/def :internal.shape/fill-color string?) (s/def :internal.shape/fill-opacity ::safe-number) -(s/def :internal.shape/fill-gradient (s/nilable ::gradient)) +(s/def :internal.shape/fill-color-gradient (s/nilable ::gradient)) (s/def :internal.shape/fill-color-ref-file (s/nilable uuid?)) (s/def :internal.shape/fill-color-ref-id (s/nilable uuid?)) @@ -235,6 +235,7 @@ (s/def :internal.shape/rx ::safe-number) (s/def :internal.shape/ry ::safe-number) (s/def :internal.shape/stroke-color string?) +(s/def :internal.shape/stroke-color-gradient (s/nilable ::gradient)) (s/def :internal.shape/stroke-color-ref-file (s/nilable uuid?)) (s/def :internal.shape/stroke-color-ref-id (s/nilable uuid?)) (s/def :internal.shape/stroke-opacity ::safe-number) @@ -293,9 +294,10 @@ :internal.shape/collapsed :internal.shape/content :internal.shape/fill-color + :internal.shape/fill-opacity + :internal.shape/fill-color-gradient :internal.shape/fill-color-ref-file :internal.shape/fill-color-ref-id - :internal.shape/fill-opacity :internal.shape/font-family :internal.shape/font-size :internal.shape/font-style @@ -330,9 +332,10 @@ :internal.shape/blur])) (def component-sync-attrs {:fill-color :fill-group + :fill-opacity :fill-group + :fill-color-gradient :fill-group :fill-color-ref-file :fill-group :fill-color-ref-id :fill-group - :fill-opacity :fill-group :content :content-group :font-family :text-font-group :font-size :text-font-group @@ -342,6 +345,7 @@ :line-height :text-display-group :text-align :text-display-group :stroke-color :stroke-group + :stroke-color-gradient :stroke-group :stroke-color-ref-file :stroke-group :stroke-color-ref-id :stroke-group :stroke-opacity :stroke-group @@ -361,6 +365,8 @@ :height :geometry-group :transform :geometry-group :transform-inverse :geometry-group + :shadow :shadow-group + :blur :blur-group :masked-group? :mask-group}) ;; shapes-group is handled differently diff --git a/frontend/src/app/main/data/workspace/libraries_helpers.cljs b/frontend/src/app/main/data/workspace/libraries_helpers.cljs index cdf122c05..8347e9bc1 100644 --- a/frontend/src/app/main/data/workspace/libraries_helpers.cljs +++ b/frontend/src/app/main/data/workspace/libraries_helpers.cljs @@ -1013,27 +1013,23 @@ (assoc $ :component-id (:id container))))]] [rchanges uchanges]) - (if-not (contains? dest-shape attr) - (recur (next attrs) - roperations - uoperations) - (let [roperation {:type :set - :attr attr - :val (get origin-shape attr) - :ignore-touched (not set-touched?)} - uoperation {:type :set - :attr attr - :val (get dest-shape attr) - :ignore-touched (not set-touched?)} + (let [roperation {:type :set + :attr attr + :val (get origin-shape attr) + :ignore-touched (not set-touched?)} + uoperation {:type :set + :attr attr + :val (get dest-shape attr) + :ignore-touched (not set-touched?)} - attr-group (get cp/component-sync-attrs attr)] - (if (and (touched attr-group) omit-touched?) - (recur (next attrs) - roperations - uoperations) - (recur (next attrs) - (conj roperations roperation) - (conj uoperations uoperation)))))))))) + attr-group (get cp/component-sync-attrs attr)] + (if (and (touched attr-group) omit-touched?) + (recur (next attrs) + roperations + uoperations) + (recur (next attrs) + (conj roperations roperation) + (conj uoperations uoperation))))))))) (defn- reposition-shape [shape origin-root dest-root]