mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-18 21:20:59 +00:00
Fix error when parsing gradient-based fill attribute. Closes #749
This commit is contained in:
parent
bbe83dad0f
commit
5717df817b
1 changed files with 3 additions and 0 deletions
|
|
@ -92,8 +92,11 @@
|
|||
*/
|
||||
function _setStrokeFillOpacity(attributes) {
|
||||
for (var attr in colorAttributes) {
|
||||
|
||||
if (!attributes[attr] || typeof attributes[colorAttributes[attr]] === 'undefined') continue;
|
||||
|
||||
if (attributes[attr].indexOf('url(') === 0) continue;
|
||||
|
||||
var color = new fabric.Color(attributes[attr]);
|
||||
attributes[attr] = color.setAlpha(toFixed(color.getAlpha() * attributes[colorAttributes[attr]], 2)).toRgba();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue