mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -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;
|
||||
|
||||
if (item._visibility != null)
|
||||
attrs._visibility = item._visibility ? 'visible' : 'hidden';
|
||||
if (item._visibility != null && !item._visibility)
|
||||
attrs.visibility = 'hidden';
|
||||
|
||||
return setAttributes(svg, attrs);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue