🐛 Fix wrap not working in plugins

This commit is contained in:
alonso.torres 2024-07-22 11:27:29 +02:00
parent 26fa2a71ea
commit d13b9ef3ea
2 changed files with 18 additions and 3 deletions

View file

@ -66,6 +66,22 @@
(let [id (obj/get self "$id")]
(st/emit! (dwsl/update-layout #{id} {:layout-flex-dir value}))))))}
{:name "wrap"
:get #(-> % u/proxy->shape :layout-wrap-type d/name)
:set
(fn [self value]
(let [value (keyword value)]
(cond
(not (contains? ctl/wrap-types value))
(u/display-not-valid :wrap value)
(not (r/check-permission plugin-id "content:write"))
(u/display-not-valid :wrap "Plugin doesn't have 'content:write' permission")
:else
(let [id (obj/get self "$id")]
(st/emit! (dwsl/update-layout #{id} {:layout-wrap-type value}))))))}
{:name "alignItems"
:get #(-> % u/proxy->shape :layout-align-items d/name)
:set