Update gradient.class.js

This commit is contained in:
Andrea Bogazzi 2014-08-19 15:07:33 +02:00
parent 92604f1ee4
commit 29b6ae03e5

View file

@ -40,13 +40,12 @@
color = new fabric.Color(color);
colorAlpha = color.getAlpha();
color = color.toRgb();
opacity = isNaN(parseFloat(opacity)) ? 1 : parseFloat(opacity);
opacity *= colorAlpha;
return {
offset: offset,
color: color,
color: color.toRgb(),
opacity: opacity
};
}