summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-01-28 12:07:23 +0100
committerwout <wout@impinc.co.uk>2014-01-28 12:07:23 +0100
commite080f28b609630a9767dad9a8483e1bf800b8550 (patch)
tree46b1bbcfebb4c42be9c7925890a34b173ea06794
parent2dc281fec9a4f0546cc9ca8b1e413a6768ae058c (diff)
downloadsvg.js-e080f28b609630a9767dad9a8483e1bf800b8550.tar.gz
svg.js-e080f28b609630a9767dad9a8483e1bf800b8550.zip
Updated README
-rw-r--r--README.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/README.md b/README.md
index 600a052..484856e 100644
--- a/README.md
+++ b/README.md
@@ -449,13 +449,15 @@ var elements = $('#drawing g.my-group .my-element').each(function() {
})
```
-## Circluar reference
+## Circular reference
Every element instance within svg.js has a reference to the actual `node`:
+### node
```javascript
element.node
```
+### instance
Similarly, the node carries a reference to the svg.js `instance`:
```javascript
@@ -465,7 +467,7 @@ node.instance
## Parent reference
Every element has a reference to its parent:
-### Parent
+### parent
```javascript
element.parent
@@ -479,7 +481,7 @@ var draw = SVG('drawing')
draw.parent //-> returns the wrappig html element with id 'drawing'
```
-### Doc
+### doc()
For more specific parent filtering the `doc()` method can be used:
```javascript