From dbbefa952608cf0729f0f3cd657c34f8fa4a4789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 2 Mar 2011 16:22:26 +0000 Subject: [PATCH] index on master: fd4b7b7 Include DocumentView.js in all examples and tests. --- src/path/Curve.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/path/Curve.js diff --git a/src/path/Curve.js b/src/path/Curve.js new file mode 100644 index 00000000..d6ed51bc --- /dev/null +++ b/src/path/Curve.js @@ -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; + } + } +});