mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-04 03:44:45 +00:00
Update gradient.class.js
why it didn't tell me all togheter is a mistery. Code style fix part 2.
This commit is contained in:
parent
f854db4e4c
commit
2dd8884129
1 changed files with 3 additions and 2 deletions
|
|
@ -377,11 +377,12 @@
|
|||
propValue = parseFloat(options[prop], 10);
|
||||
if (typeof options[prop] === 'string' && /^\d+%$/.test(options[prop])) {
|
||||
multFactor = 0.01;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
multFactor = 1;
|
||||
}
|
||||
if (prop === 'x1' || prop === 'x2' || prop === 'r2') {
|
||||
multFactor *= gradientUnits === 'objectBoundingBox' ? object.width : 1;
|
||||
multFactor *= gradientUnits === 'objectBoundingBox' ? object.width : 1;
|
||||
addFactor = gradientUnits === 'objectBoundingBox' ? object.left || 0 : 0;
|
||||
}
|
||||
else if (prop === 'y1' || prop === 'y2') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue