summaryrefslogtreecommitdiffstats
path: root/src/set.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/set.js')
-rwxr-xr-xsrc/set.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/set.js b/src/set.js
index 4c42efc..1fba388 100755
--- a/src/set.js
+++ b/src/set.js
@@ -44,6 +44,14 @@ SVG.extend(SVG.Set, {
return this
}
+ // Checks if a given element is present in set
+, has: function(element) {
+ return this.members.indexOf(element) >= 0
+ }
+ // Get member at given index
+, get: function(i) {
+ return this.members[i]
+ }
// Default value
, valueOf: function() {
return this.members