From 1953dbcdb44c6ae94e18501e8c1168e8fb8d71d8 Mon Sep 17 00:00:00 2001 From: wout Date: Sat, 21 Jun 2014 22:04:12 +0200 Subject: Documented and added specs for new selector method --- src/set.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/set.js') diff --git a/src/set.js b/src/set.js index 37246fe..a4690bf 100755 --- a/src/set.js +++ b/src/set.js @@ -1,8 +1,8 @@ SVG.Set = SVG.invent({ // Initialize - create: function() { - /* set initial state */ - this.clear() + create: function(members) { + // Set initial state + Array.isArray(members) ?this.members = members : this.clear() } // Add class methods @@ -91,8 +91,8 @@ SVG.Set = SVG.invent({ // Add parent method , construct: { // Create a new set - set: function() { - return new SVG.Set + set: function(members) { + return new SVG.Set(members) } } }) -- cgit v1.2.3