From 257dab4775234c6abaffe145d1a3908b5dd37952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Mon, 10 Jun 2024 11:06:18 +0200 Subject: [PATCH] :bug: Fix export hidden shapes --- frontend/src/app/main/render.cljs | 2 +- frontend/src/app/main/ui/shapes/shape.cljs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/render.cljs b/frontend/src/app/main/render.cljs index 16c961b5d..bbf85e4ad 100644 --- a/frontend/src/app/main/render.cljs +++ b/frontend/src/app/main/render.cljs @@ -149,7 +149,7 @@ svg-raw-wrapper (mf/use-memo (mf/deps objects) #(svg-raw-wrapper-factory objects)) bool-wrapper (mf/use-memo (mf/deps objects) #(bool-wrapper-factory objects)) frame-wrapper (mf/use-memo (mf/deps objects) #(frame-wrapper-factory objects))] - (when (and shape (not (:hidden shape))) + (when shape (let [opts #js {:shape shape} svg-raw? (= :svg-raw (:type shape))] (if-not svg-raw? diff --git a/frontend/src/app/main/ui/shapes/shape.cljs b/frontend/src/app/main/ui/shapes/shape.cljs index e0ab37c45..e4082b89c 100644 --- a/frontend/src/app/main/ui/shapes/shape.cljs +++ b/frontend/src/app/main/ui/shapes/shape.cljs @@ -72,6 +72,8 @@ (obj/set! "pointerEvents" pointer-events) (cond-> (not (cfh/frame-shape? shape)) (obj/set! "opacity" (:opacity shape))) + (cond-> (:hidden shape) + (obj/set! "display" "none")) (cond-> (and blend-mode (not= blend-mode :normal)) (obj/set! "mixBlendMode" (d/name blend-mode))))