mirror of
https://github.com/penpot/penpot.git
synced 2025-06-13 13:11:40 +02:00
🐛 Fix problem when removing margins
This commit is contained in:
parent
785b58a6c4
commit
3db04e1e2b
3 changed files with 17 additions and 6 deletions
|
@ -553,7 +553,7 @@
|
|||
parent-ids (->> ids (map #(cph/get-parent-id objects %)))
|
||||
undo-id (js/Symbol)]
|
||||
(rx/of (dwu/start-undo-transaction undo-id)
|
||||
(dwc/update-shapes ids #(d/deep-merge (or % {}) changes))
|
||||
(dwc/update-shapes ids #(d/without-nils-deep (d/deep-merge (or % {}) changes)))
|
||||
(dwc/update-shapes children-ids (partial fix-child-sizing objects changes))
|
||||
(dwc/update-shapes parent-ids
|
||||
(fn [parent]
|
||||
|
|
|
@ -45,21 +45,18 @@
|
|||
m1 (when (and (not (= :multiple (:layout-item-margin values)))
|
||||
(= (dm/get-in values [:layout-item-margin :m1])
|
||||
(dm/get-in values [:layout-item-margin :m3])))
|
||||
(dm/get-in values [:layout-item-margin :m1])
|
||||
)
|
||||
(dm/get-in values [:layout-item-margin :m1]))
|
||||
|
||||
m2 (when (and (not (= :multiple (:layout-item-margin values)))
|
||||
(= (dm/get-in values [:layout-item-margin :m2])
|
||||
(dm/get-in values [:layout-item-margin :m4])))
|
||||
(dm/get-in values [:layout-item-margin :m2])
|
||||
)
|
||||
(dm/get-in values [:layout-item-margin :m2]))
|
||||
select-margins
|
||||
(fn [m1? m2? m3? m4?]
|
||||
(st/emit! (udw/set-margins-selected {:m1 m1? :m2 m2? :m3 m3? :m4 m4?})))
|
||||
|
||||
select-margin #(select-margins (= % :m1) (= % :m2) (= % :m3) (= % :m4))]
|
||||
|
||||
|
||||
(mf/use-effect
|
||||
(fn []
|
||||
(fn []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue