mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Add comment about caching _css values.
This commit is contained in:
parent
68dc7e8b12
commit
62c7bb804b
1 changed files with 2 additions and 0 deletions
|
@ -479,6 +479,8 @@ var Color = this.Color = Base.extend(new function() {
|
|||
*/
|
||||
toCss: function(noAlpha) {
|
||||
var css = this._css;
|
||||
// Only cache _css value if we're not ommiting alpha, as required
|
||||
// by SVG export.
|
||||
if (!css || noAlpha) {
|
||||
var color = this.convert('rgb'),
|
||||
alpha = noAlpha ? 1 : color.getAlpha(),
|
||||
|
|
Loading…
Reference in a new issue