From 1bb6f2754c4960400abef9a6e3c2c8004851480f Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Mon, 16 Jun 2025 16:01:50 +0200 Subject: [PATCH 1/2] :bug: Fix allocate 0 bytes for path attrs --- frontend/src/app/render_wasm/api.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/render_wasm/api.cljs b/frontend/src/app/render_wasm/api.cljs index c3c762c016..8bb40ecf59 100644 --- a/frontend/src/app/render_wasm/api.cljs +++ b/frontend/src/app/render_wasm/api.cljs @@ -739,7 +739,7 @@ (when (and (some? content) (or (= type :path) (= type :bool))) - (when (some? svg-attrs) + (when (seq svg-attrs) (set-shape-path-attrs svg-attrs)) (set-shape-path-content content)) (when (and (some? content) (= type :svg-raw)) From 81d2b9a82ebeaf8d3003bad62e6d1b83be130800 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Tue, 17 Jun 2025 09:17:54 +0200 Subject: [PATCH 2/2] :bug: Fix group fills propagation when fill is none --- render-wasm/src/render.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/render-wasm/src/render.rs b/render-wasm/src/render.rs index 0cca775c47..d00c6a307f 100644 --- a/render-wasm/src/render.rs +++ b/render-wasm/src/render.rs @@ -449,7 +449,15 @@ impl RenderState { s.canvas().concat(&matrix); }); - if shape.fills.is_empty() && !matches!(shape.shape_type, Type::Group(_)) { + let has_fill_none = matches!( + shape.svg_attrs.get("fill").map(String::as_str), + Some("none") + ); + + if shape.fills.is_empty() + && !matches!(shape.shape_type, Type::Group(_)) + && !has_fill_none + { if let Some(fills_to_render) = self.nested_fills.last() { let fills_to_render = fills_to_render.clone(); for fill in fills_to_render.iter() {