diff options
author | wout <wout@impinc.co.uk> | 2014-01-28 12:07:23 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-01-28 12:07:23 +0100 |
commit | e080f28b609630a9767dad9a8483e1bf800b8550 (patch) | |
tree | 46b1bbcfebb4c42be9c7925890a34b173ea06794 | |
parent | 2dc281fec9a4f0546cc9ca8b1e413a6768ae058c (diff) | |
download | svg.js-e080f28b609630a9767dad9a8483e1bf800b8550.tar.gz svg.js-e080f28b609630a9767dad9a8483e1bf800b8550.zip |
Updated README
-rw-r--r-- | README.md | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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 |