summaryrefslogtreecommitdiffstats
path: root/src/set.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-06-21 22:04:12 +0200
committerwout <wout@impinc.co.uk>2014-06-21 22:04:12 +0200
commit1953dbcdb44c6ae94e18501e8c1168e8fb8d71d8 (patch)
treedf59a0db9cc0156ba64ebbc08f3cb5b670f71153 /src/set.js
parent0bb294ad9189797014b1e1bf55e41ca4b1ead19e (diff)
downloadsvg.js-1953dbcdb44c6ae94e18501e8c1168e8fb8d71d8.tar.gz
svg.js-1953dbcdb44c6ae94e18501e8c1168e8fb8d71d8.zip
Documented and added specs for new selector method
Diffstat (limited to 'src/set.js')
-rwxr-xr-xsrc/set.js10
1 files changed, 5 insertions, 5 deletions
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)
}
}
})