diff options
author | wout <wout@impinc.co.uk> | 2013-06-27 16:36:26 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-06-27 16:36:26 +0100 |
commit | 8cb2aba17829e6c9de15206b891e6c878b306a7b (patch) | |
tree | 6d3c45e02e918de27e5208f7f6516f48fe62551e /README.md | |
parent | 46909dc19338e649702b6ea852120af5132bc086 (diff) | |
download | svg.js-8cb2aba17829e6c9de15206b891e6c878b306a7b.tar.gz svg.js-8cb2aba17829e6c9de15206b891e6c878b306a7b.zip |
Reworked arrange module, <defs> always on top
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -359,6 +359,12 @@ rect.style() // => 'cursor:pointer;fill:#f03;' ``` +Explicitly deleting individual style definitions works the same as with the `attr()` method: + +```javascript +rect.style('cursor', null) +``` + ### Move Move the element to a given `x` and `y` position by its upper left corner: @@ -853,6 +859,19 @@ Get the previous sibling: rect.previous() ``` +Insert an element before another: + +```javascript +// inserts circle before rect +rect.before(circle) +``` + +Insert an element after another: + +```javascript +// inserts circle after rect +rect.after(circle) +``` _This functionality requires the arrange.js module which is included in the default distribution._ |