diff --git a/CHANGES.md b/CHANGES.md index b5d0ca562b..9f70d84793 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -16,6 +16,7 @@ - Fix viewport resize on locked shapes [Taiga #11974](https://tree.taiga.io/project/penpot/issue/11974) - Fix nested variant in a component doesn't keep inherited overrides [Taiga #12299](https://tree.taiga.io/project/penpot/issue/12299) - Fix on copy instance inside a components chain touched are missing [Taiga #12371](https://tree.taiga.io/project/penpot/issue/12371) +- Fix problem with multiple selection and shadows [Github #7437](https://github.com/penpot/penpot/issues/7437) ## 2.11.0 (Unreleased) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/rows/shadow_row.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/rows/shadow_row.cljs index e361615511..48a8b8ca0d 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/rows/shadow_row.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/rows/shadow_row.cljs @@ -53,39 +53,46 @@ on-remove (mf/use-fn (mf/deps index) #(on-remove index)) + trigger-bounding-box-cloaking + (mf/use-fn + (mf/deps shadow-id) + (fn [] + (when shadow-id + (st/emit! (dw/trigger-bounding-box-cloaking [shadow-id]))))) + on-update-offset-x (mf/use-fn - (mf/deps index) + (mf/deps index trigger-bounding-box-cloaking) (fn [value] - (st/emit! (dw/trigger-bounding-box-cloaking [shadow-id])) + (trigger-bounding-box-cloaking) (on-update index :offset-x value))) on-update-offset-y (mf/use-fn - (mf/deps index) + (mf/deps index trigger-bounding-box-cloaking) (fn [value] - (st/emit! (dw/trigger-bounding-box-cloaking [shadow-id])) + (trigger-bounding-box-cloaking) (on-update index :offset-y value))) on-update-spread (mf/use-fn - (mf/deps index) + (mf/deps index trigger-bounding-box-cloaking) (fn [value] - (st/emit! (dw/trigger-bounding-box-cloaking [shadow-id])) + (trigger-bounding-box-cloaking) (on-update index :spread value))) on-update-blur (mf/use-fn - (mf/deps index) + (mf/deps index trigger-bounding-box-cloaking) (fn [value] - (st/emit! (dw/trigger-bounding-box-cloaking [shadow-id])) + (trigger-bounding-box-cloaking) (on-update index :blur value))) on-update-color (mf/use-fn - (mf/deps index on-update) + (mf/deps index on-update trigger-bounding-box-cloaking) (fn [color] - (st/emit! (dw/trigger-bounding-box-cloaking [shadow-id])) + (trigger-bounding-box-cloaking) (on-update index :color color))) on-detach-color @@ -93,16 +100,16 @@ on-style-change (mf/use-fn - (mf/deps index) + (mf/deps index trigger-bounding-box-cloaking) (fn [value] - (st/emit! (dw/trigger-bounding-box-cloaking [shadow-id])) + (trigger-bounding-box-cloaking) (on-update index :style (keyword value)))) on-toggle-visibility (mf/use-fn - (mf/deps index) + (mf/deps index trigger-bounding-box-cloaking) (fn [] - (st/emit! (dw/trigger-bounding-box-cloaking [shadow-id])) + (trigger-bounding-box-cloaking) (on-toggle-visibility index))) on-toggle-open diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs index 14ae0bc955..c0537bb5cb 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs @@ -171,7 +171,7 @@ :layout-container layout-container-flex-attrs :layout-item layout-item-attrs}) -(def shadow-keys [:style :color :offset-x :offset-y :blur :spread]) +(def shadow-keys [:style :color :offset-x :offset-y :blur :spread :hidden]) (defn shadow-eq "Function to check if two shadows are equivalent to the multiple selection (ignores their ids)"