Add bypass for saturate(5%) filter function. Helps issue #1299

This commit is contained in:
Luke Page
2013-04-30 18:58:35 +01:00
parent 446e164444
commit de27a6fd88
3 changed files with 7 additions and 0 deletions

View File

@@ -96,6 +96,11 @@ tree.functions = {
return new(tree.Dimension)(Math.round(color.luma() * color.alpha * 100), '%');
},
saturate: function (color, amount) {
// filter: saturate(3.2);
// should be kept as is, so check for color
if (!color.rgb) {
return null;
}
var hsl = color.toHSL();
hsl.s += amount.value / 100;