🐛 Fix problem with multiple selection and shadows

This commit is contained in:
alonso.torres
2025-10-15 11:53:25 +02:00
committed by Alonso Torres
parent d0e5d0d952
commit 93e7f2950b
3 changed files with 23 additions and 15 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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)"