summaryrefslogtreecommitdiffstats
path: root/src/container.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-06-23 15:32:20 +0100
committerwout <wout@impinc.co.uk>2013-06-23 15:32:20 +0100
commit65f915f1f3c878d97634ed360337d0ab2ea2d0d3 (patch)
tree5459c3fc8a0f43f14a5fea19f0aa82336b985073 /src/container.js
parent9841728efbe16219a1c412951841a06ee98ff6ec (diff)
downloadsvg.js-65f915f1f3c878d97634ed360337d0ab2ea2d0d3.tar.gz
svg.js-65f915f1f3c878d97634ed360337d0ab2ea2d0d3.zip
Added `get()` method to SVG.Container
Diffstat (limited to 'src/container.js')
-rw-r--r--src/container.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/container.js b/src/container.js
index dbf2205..cb010f2 100644
--- a/src/container.js
+++ b/src/container.js
@@ -40,6 +40,10 @@ SVG.extend(SVG.Container, {
, has: function(element) {
return this.children().indexOf(element) >= 0
}
+ // Get a element at the given index
+, get: function(i) {
+ return this.children()[i]
+ }
// Iterates over all children and invokes a given block
, each: function(block, deep) {
var i, il