fix alpha channel being ignored in operations

This commit is contained in:
Alexis Sellier
2011-02-19 15:28:33 -05:00
parent e199ac8c8e
commit 93d8f9c364

View File

@@ -61,7 +61,7 @@ tree.Color.prototype = {
for (var c = 0; c < 3; c++) {
result[c] = tree.operate(op, this.rgb[c], other.rgb[c]);
}
return new(tree.Color)(result);
return new(tree.Color)(result, this.alpha + other.alpha);
},
toHSL: function () {