From e7c06fed2249df1c1a7561e520792bf759a9d098 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Fri, 24 Jan 2025 09:15:41 +0100 Subject: [PATCH] :tada: Improve clipping objects for wasm render --- frontend/src/app/render_wasm/api.cljs | 4 +++- frontend/src/app/render_wasm/shape.cljs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/render_wasm/api.cljs b/frontend/src/app/render_wasm/api.cljs index de3a875d6..376acfde5 100644 --- a/frontend/src/app/render_wasm/api.cljs +++ b/frontend/src/app/render_wasm/api.cljs @@ -493,7 +493,9 @@ id (dm/get-prop shape :id) type (dm/get-prop shape :type) selrect (dm/get-prop shape :selrect) - clip-content (not (dm/get-prop shape :show-content)) + clip-content (if (= type :frame) + (not (dm/get-prop shape :show-content)) + false) rotation (dm/get-prop shape :rotation) transform (dm/get-prop shape :transform) fills (if (= type :group) diff --git a/frontend/src/app/render_wasm/shape.cljs b/frontend/src/app/render_wasm/shape.cljs index 0e76ddefc..843bec2b4 100644 --- a/frontend/src/app/render_wasm/shape.cljs +++ b/frontend/src/app/render_wasm/shape.cljs @@ -115,7 +115,9 @@ :bool-type (api/set-shape-bool-type v) :bool-content (api/set-shape-bool-content v) :selrect (api/set-shape-selrect v) - :show-content (api/set-shape-clip-content (not v)) + :show-content (if (= (:type self) :frame) + (api/set-shape-clip-content (not v)) + (api/set-shape-clip-content false)) :rotation (api/set-shape-rotation v) :transform (api/set-shape-transform v) :fills (api/set-shape-fills v)