Improve frame thumbnail rendering

This commit is contained in:
alonso.torres 2021-05-12 14:44:35 +02:00 committed by Andrey Antukh
parent 37f9a5d9f2
commit 3656ab977b
10 changed files with 68 additions and 33 deletions

View file

@ -16,8 +16,9 @@
[rumext.alpha :as mf]))
(mf/defc shape-container
{::mf/wrap-props false}
[props]
{::mf/forward-ref true
::mf/wrap-props false}
[props ref]
(let [shape (obj/get props "shape")
children (obj/get props "children")
pointer-events (obj/get props "pointer-events")
@ -33,6 +34,7 @@
frame? (= :frame type)
group-props (-> (obj/clone props)
(obj/without ["shape" "children"])
(obj/set! "ref" ref)
(obj/set! "id" (str "shape-" (:id shape)))
(obj/set! "filter" (filters/filter-str filter-id shape))
(obj/set! "style" styles)