mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
index on master: fd4b7b7
Include DocumentView.js in all examples and tests.
This commit is contained in:
parent
fd4b7b76ae
commit
dbbefa9526
1 changed files with 20 additions and 0 deletions
20
src/path/Curve.js
Normal file
20
src/path/Curve.js
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
Curve = Base.extend({
|
||||||
|
initialize: function() {
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
statics: {
|
||||||
|
read: function(args, index) {
|
||||||
|
var index = index || 0, length = args.length - index;
|
||||||
|
if (length == 1 && args[index] instanceof Curve) {
|
||||||
|
return args[index];
|
||||||
|
} else if (length != 0) {
|
||||||
|
var curve = new Curve(Curve.dont);
|
||||||
|
curve.initialize.apply(curve, index > 0
|
||||||
|
? Array.prototype.slice.call(args, index) : args);
|
||||||
|
return curve;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in a new issue