mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Shorten importGradient() code.
This commit is contained in:
parent
203c9b16ca
commit
e6913e0013
1 changed files with 2 additions and 5 deletions
|
@ -207,11 +207,8 @@ new function() {
|
|||
stops = [];
|
||||
for (var i = 0, l = nodes.length; i < l; i++) {
|
||||
var node = nodes[i];
|
||||
if (node.nodeType == 1) {
|
||||
var stop = new GradientStop();
|
||||
applyAttributes(stop, node);
|
||||
stops.push(stop);
|
||||
}
|
||||
if (node.nodeType == 1)
|
||||
stops.push(applyAttributes(new GradientStop(), node));
|
||||
}
|
||||
var gradient = new Gradient(stops),
|
||||
isRadial = type == 'radialgradient',
|
||||
|
|
Loading…
Reference in a new issue