mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 08:16:37 +02:00
🐛 Fix padding/gap/margin remain glowing when the shape is deselected and selected again
This commit is contained in:
parent
4774cc4859
commit
d3ae53e3ef
2 changed files with 19 additions and 0 deletions
|
@ -256,6 +256,12 @@
|
||||||
|
|
||||||
select-padding #(select-paddings (= % :p1) (= % :p2) (= % :p3) (= % :p4))]
|
select-padding #(select-paddings (= % :p1) (= % :p2) (= % :p3) (= % :p4))]
|
||||||
|
|
||||||
|
(mf/use-effect
|
||||||
|
(fn []
|
||||||
|
(fn []
|
||||||
|
;;on destroy component
|
||||||
|
(select-paddings false false false false))))
|
||||||
|
|
||||||
[:div.padding-row
|
[:div.padding-row
|
||||||
(cond
|
(cond
|
||||||
(= padding-type :simple)
|
(= padding-type :simple)
|
||||||
|
@ -315,6 +321,13 @@
|
||||||
(let [select-gap
|
(let [select-gap
|
||||||
(fn [gap]
|
(fn [gap]
|
||||||
(st/emit! (udw/set-gap-selected gap)))]
|
(st/emit! (udw/set-gap-selected gap)))]
|
||||||
|
|
||||||
|
(mf/use-effect
|
||||||
|
(fn []
|
||||||
|
(fn []
|
||||||
|
;;on destroy component
|
||||||
|
(select-gap nil))))
|
||||||
|
|
||||||
[:div.layout-row
|
[:div.layout-row
|
||||||
[:div.gap.row-title "Gap"]
|
[:div.gap.row-title "Gap"]
|
||||||
[:div.gap-group
|
[:div.gap-group
|
||||||
|
|
|
@ -54,6 +54,12 @@
|
||||||
|
|
||||||
select-margin #(select-margins (= % :m1) (= % :m2) (= % :m3) (= % :m4))]
|
select-margin #(select-margins (= % :m1) (= % :m2) (= % :m3) (= % :m4))]
|
||||||
|
|
||||||
|
(mf/use-effect
|
||||||
|
(fn []
|
||||||
|
(fn []
|
||||||
|
;;on destroy component
|
||||||
|
(select-margins false false false false))))
|
||||||
|
|
||||||
[:div.margin-row
|
[:div.margin-row
|
||||||
(cond
|
(cond
|
||||||
(= margin-type :simple)
|
(= margin-type :simple)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue