summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2015-10-26 23:06:32 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2015-10-26 23:06:32 +0100
commit2bcd57ca3776a026786c0812206a17d4f1aeae19 (patch)
tree0d3f0620cf915d565c88a3a7f5b28b963cab63e8 /README.md
parent48537ddd925fb28d4bc4b4188b14d316e51ce29f (diff)
downloadsvg.js-2bcd57ca3776a026786c0812206a17d4f1aeae19.tar.gz
svg.js-2bcd57ca3776a026786c0812206a17d4f1aeae19.zip
update readme and changelog
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/README.md b/README.md
index c22f633..290081e 100644
--- a/README.md
+++ b/README.md
@@ -974,6 +974,21 @@ var rect = draw.rect(100, 100)
rect.doc() //-> returns draw
```
+### parents()
+To get all ancestors of the element filtered by type or css selector (see `parent()` method)
+
+```javascript
+var group1 = draw.group().addClass('test')
+ , group2 = group1.group()
+ , rect = group2.rect(100,100)
+
+rect.parents() // returns [group1, group2, draw]
+rect.parents('.test') // returns [group1]
+rect.parents(SVG.G) // returns [group1, group2]
+```
+
+__`returns`: `Array`__
+
## Child references
### first()