mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -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),
|
||||
destination = color.getDestination().transform(matrix),
|
||||
attrs;
|
||||
if (radial) {
|
||||
attrs = {
|
||||
cx: origin.x,
|
||||
cy: origin.y,
|
||||
r: origin.getDistance(destination)
|
||||
};
|
||||
var highlight = color.getHighlight();
|
||||
if (highlight) {
|
||||
highlight = highlight.transform(matrix);
|
||||
attrs.fx = highlight.x;
|
||||
attrs.fy = highlight.y;
|
||||
}
|
||||
} else {
|
||||
attrs = {
|
||||
x1: origin.x,
|
||||
y1: origin.y,
|
||||
x2: destination.x,
|
||||
y2: destination.y
|
||||
};
|
||||
if (radial) {
|
||||
attrs = {
|
||||
cx: origin.x,
|
||||
cy: origin.y,
|
||||
r: origin.getDistance(destination)
|
||||
};
|
||||
var highlight = color.getHighlight();
|
||||
if (highlight) {
|
||||
highlight = highlight.transform(matrix);
|
||||
attrs.fx = highlight.x;
|
||||
attrs.fy = highlight.y;
|
||||
}
|
||||
} else {
|
||||
attrs = {
|
||||
x1: origin.x,
|
||||
y1: origin.y,
|
||||
x2: destination.x,
|
||||
y2: destination.y
|
||||
};
|
||||
}
|
||||
attrs.gradientUnits = 'userSpaceOnUse';
|
||||
gradientNode = createElement(
|
||||
(radial ? 'radial' : 'linear') + 'Gradient', attrs);
|
||||
|
|
Loading…
Reference in a new issue