summaryrefslogtreecommitdiffstats
path: root/src/set.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-01-26 17:50:45 +0100
committerwout <wout@impinc.co.uk>2014-01-26 17:50:45 +0100
commit22212053f79344f2f11f77e699f7f307a25eb9a9 (patch)
treee6a02dfc8b440f2048fc7b3ffea86e6eed3a50ed /src/set.js
parenta6aacddee1b7e62101aa2d7e6ed9bc41b61f99a6 (diff)
downloadsvg.js-22212053f79344f2f11f77e699f7f307a25eb9a9.tar.gz
svg.js-22212053f79344f2f11f77e699f7f307a25eb9a9.zip
Added get to SVG.Set, bumped to v0.37
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