Add comment about caching _css values.

This commit is contained in:
Jürg Lehni 2012-12-08 20:12:36 -08:00
parent 68dc7e8b12
commit 62c7bb804b

View file

@ -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(),