mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -05:00
🐛 Fix z-index nillable input when static position
This commit is contained in:
parent
94b5c98042
commit
8955f87d5a
1 changed files with 6 additions and 0 deletions
|
@ -192,6 +192,8 @@
|
||||||
(if (= align-self value)
|
(if (= align-self value)
|
||||||
(st/emit! (dwsl/update-layout-child ids {:layout-item-align-self nil}))
|
(st/emit! (dwsl/update-layout-child ids {:layout-item-align-self nil}))
|
||||||
(st/emit! (dwsl/update-layout-child ids {:layout-item-align-self value}))))
|
(st/emit! (dwsl/update-layout-child ids {:layout-item-align-self value}))))
|
||||||
|
|
||||||
|
is-absolute? (:layout-item-absolute values)
|
||||||
|
|
||||||
is-col? (every? ctl/col? selection-parents)
|
is-col? (every? ctl/col? selection-parents)
|
||||||
|
|
||||||
|
@ -219,6 +221,8 @@
|
||||||
|
|
||||||
on-change-position
|
on-change-position
|
||||||
(fn [value]
|
(fn [value]
|
||||||
|
(when (= value :static)
|
||||||
|
(st/emit! (dwsl/update-layout-child ids {:layout-item-z-index nil})))
|
||||||
(st/emit! (dwsl/update-layout-child ids {:layout-item-absolute (= value :absolute)})))
|
(st/emit! (dwsl/update-layout-child ids {:layout-item-absolute (= value :absolute)})))
|
||||||
|
|
||||||
on-change-z-index
|
on-change-z-index
|
||||||
|
@ -254,6 +258,8 @@
|
||||||
{:placeholder "--"
|
{:placeholder "--"
|
||||||
:on-focus #(dom/select-target %)
|
:on-focus #(dom/select-target %)
|
||||||
:on-change #(on-change-z-index %)
|
:on-change #(on-change-z-index %)
|
||||||
|
:nillable true
|
||||||
|
:disabled (not is-absolute?)
|
||||||
:value (:layout-item-z-index values)}]]]])
|
:value (:layout-item-z-index values)}]]]])
|
||||||
|
|
||||||
(when (not (:layout-item-absolute values))
|
(when (not (:layout-item-absolute values))
|
||||||
|
|
Loading…
Add table
Reference in a new issue