From 49801e4b8b0c14670c1874941b89782eb419626e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 26 Feb 2014 14:55:43 +0100 Subject: [PATCH] Improve performance of Path.Line() constructor. Passing an array is much faster than using arguments directly. --- src/path/Path.Constructors.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/path/Path.Constructors.js b/src/path/Path.Constructors.js index 3e6d28fe..022d1d4d 100644 --- a/src/path/Path.Constructors.js +++ b/src/path/Path.Constructors.js @@ -73,10 +73,10 @@ Path.inject({ statics: new function() { * }); */ Line: function(/* from, to */) { - return new Path( + return new Path([ Point.readNamed(arguments, 'from'), Point.readNamed(arguments, 'to') - ).set(Base.getNamed(arguments)); + ]).set(Base.getNamed(arguments)); }, /**