Improve setting svg attrs in wasm

This commit is contained in:
Alejandro Alonso
2025-10-23 14:22:22 +02:00
committed by Alonso Torres
parent dba718b850
commit 479ce99b32
14 changed files with 1554 additions and 73 deletions

View File

@@ -764,14 +764,9 @@ impl RenderState {
&shape
};
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
&& !shape.svg_attrs.fill_none
{
if let Some(fills_to_render) = self.nested_fills.last() {
let fills_to_render = fills_to_render.clone();