mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Only set opacity and visibility when they differ from the defaults.
This commit is contained in:
parent
01342fa073
commit
0e22430993
1 changed files with 3 additions and 3 deletions
|
@ -353,11 +353,11 @@ new function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (item._opacity != null)
|
if (item._opacity != null && item._opacity < 1)
|
||||||
attrs.opacity = item._opacity;
|
attrs.opacity = item._opacity;
|
||||||
|
|
||||||
if (item._visibility != null)
|
if (item._visibility != null && !item._visibility)
|
||||||
attrs._visibility = item._visibility ? 'visible' : 'hidden';
|
attrs.visibility = 'hidden';
|
||||||
|
|
||||||
return setAttributes(svg, attrs);
|
return setAttributes(svg, attrs);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue