mirror of
https://github.com/penpot/penpot.git
synced 2025-07-14 08:57:16 +02:00
Merge pull request #6695 from penpot/superalex-fix-allocate-0-bytes-path-attrs
🐛 Fix wasm render path issues
This commit is contained in:
commit
01311225c7
2 changed files with 10 additions and 2 deletions
|
@ -739,7 +739,7 @@
|
||||||
(when (and (some? content)
|
(when (and (some? content)
|
||||||
(or (= type :path)
|
(or (= type :path)
|
||||||
(= type :bool)))
|
(= type :bool)))
|
||||||
(when (some? svg-attrs)
|
(when (seq svg-attrs)
|
||||||
(set-shape-path-attrs svg-attrs))
|
(set-shape-path-attrs svg-attrs))
|
||||||
(set-shape-path-content content))
|
(set-shape-path-content content))
|
||||||
(when (and (some? content) (= type :svg-raw))
|
(when (and (some? content) (= type :svg-raw))
|
||||||
|
|
|
@ -457,7 +457,15 @@ impl RenderState {
|
||||||
s.canvas().concat(&matrix);
|
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() {
|
if let Some(fills_to_render) = self.nested_fills.last() {
|
||||||
let fills_to_render = fills_to_render.clone();
|
let fills_to_render = fills_to_render.clone();
|
||||||
for fill in fills_to_render.iter() {
|
for fill in fills_to_render.iter() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue