mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Fix formatting.
This commit is contained in:
parent
e2ae03d571
commit
6f347c98b3
1 changed files with 19 additions and 19 deletions
|
@ -347,26 +347,26 @@ new function() {
|
||||||
origin = color.getOrigin().transform(matrix),
|
origin = color.getOrigin().transform(matrix),
|
||||||
destination = color.getDestination().transform(matrix),
|
destination = color.getDestination().transform(matrix),
|
||||||
attrs;
|
attrs;
|
||||||
if (radial) {
|
if (radial) {
|
||||||
attrs = {
|
attrs = {
|
||||||
cx: origin.x,
|
cx: origin.x,
|
||||||
cy: origin.y,
|
cy: origin.y,
|
||||||
r: origin.getDistance(destination)
|
r: origin.getDistance(destination)
|
||||||
};
|
};
|
||||||
var highlight = color.getHighlight();
|
var highlight = color.getHighlight();
|
||||||
if (highlight) {
|
if (highlight) {
|
||||||
highlight = highlight.transform(matrix);
|
highlight = highlight.transform(matrix);
|
||||||
attrs.fx = highlight.x;
|
attrs.fx = highlight.x;
|
||||||
attrs.fy = highlight.y;
|
attrs.fy = highlight.y;
|
||||||
}
|
|
||||||
} else {
|
|
||||||
attrs = {
|
|
||||||
x1: origin.x,
|
|
||||||
y1: origin.y,
|
|
||||||
x2: destination.x,
|
|
||||||
y2: destination.y
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
attrs = {
|
||||||
|
x1: origin.x,
|
||||||
|
y1: origin.y,
|
||||||
|
x2: destination.x,
|
||||||
|
y2: destination.y
|
||||||
|
};
|
||||||
|
}
|
||||||
attrs.gradientUnits = 'userSpaceOnUse';
|
attrs.gradientUnits = 'userSpaceOnUse';
|
||||||
gradientNode = createElement(
|
gradientNode = createElement(
|
||||||
(radial ? 'radial' : 'linear') + 'Gradient', attrs);
|
(radial ? 'radial' : 'linear') + 'Gradient', attrs);
|
||||||
|
|
Loading…
Reference in a new issue