mirror of
https://github.com/penpot/penpot.git
synced 2025-05-18 18:56:11 +02:00
🎉 Hidden layer support for wasm render
This commit is contained in:
parent
7c7ede9d0c
commit
07215357d6
5 changed files with 20 additions and 3 deletions
|
@ -216,6 +216,10 @@
|
|||
[opacity]
|
||||
(h/call internal-module "_set_shape_opacity" (or opacity 1)))
|
||||
|
||||
(defn set-shape-hidden
|
||||
[hidden]
|
||||
(h/call internal-module "_set_shape_hidden" hidden))
|
||||
|
||||
(def debounce-render-without-cache (fns/debounce render-without-cache 100))
|
||||
|
||||
(defn set-view
|
||||
|
@ -239,7 +243,9 @@
|
|||
fills (dm/get-prop shape :fills)
|
||||
children (dm/get-prop shape :shapes)
|
||||
blend-mode (dm/get-prop shape :blend-mode)
|
||||
opacity (dm/get-prop shape :opacity)]
|
||||
opacity (dm/get-prop shape :opacity)
|
||||
hidden (dm/get-prop shape :hidden)]
|
||||
|
||||
(use-shape id)
|
||||
(set-shape-selrect selrect)
|
||||
(set-shape-rotation rotation)
|
||||
|
@ -247,6 +253,7 @@
|
|||
(set-shape-blend-mode blend-mode)
|
||||
(set-shape-children children)
|
||||
(set-shape-opacity opacity)
|
||||
(set-shape-hidden hidden)
|
||||
(let [pending-fills (doall (set-shape-fills fills))]
|
||||
(recur (inc index) (into pending pending-fills))))
|
||||
pending))]
|
||||
|
@ -263,7 +270,6 @@
|
|||
:stencil true
|
||||
:alpha true})
|
||||
|
||||
|
||||
(defn clear-canvas
|
||||
[]
|
||||
;; TODO: perform corresponding cleaning
|
||||
|
|
|
@ -118,6 +118,7 @@
|
|||
:fills (api/set-shape-fills v)
|
||||
:blend-mode (api/set-shape-blend-mode v)
|
||||
:opacity (api/set-shape-opacity v)
|
||||
:hidden (api/set-shape-hidden v)
|
||||
:shapes (api/set-shape-children v)
|
||||
nil)
|
||||
;; when something synced with wasm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue