aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2012-12-18 21:15:37 +0100
committerwout <wout@impinc.co.uk>2012-12-18 21:15:37 +0100
commit92f10e8d66b9e5f267e4a5c1711f80e3794324b9 (patch)
tree2c2e5ffbb63769e9971c9322188ce394e18ff63f
parent1293edb66a5263f8f7064f16f11cbf6b8f550800 (diff)
downloadsvg.js-92f10e8d66b9e5f267e4a5c1711f80e3794324b9.tar.gz
svg.js-92f10e8d66b9e5f267e4a5c1711f80e3794324b9.zip
Added arrange functionality to readme
-rw-r--r--README.md31
1 files changed, 29 insertions, 2 deletions
diff --git a/README.md b/README.md
index 141749d..f55f3c1 100644
--- a/README.md
+++ b/README.md
@@ -32,10 +32,13 @@ This will generate the following output:
### Manipulating elements
-#### Setting attributes
-You can set an element's attributes directly with 'attr()':
+#### Attributes
+You can get set an element's attributes directly using 'attr()':
```javascript
+// get a single attribute
+rect.attr('x');
+
// set a single attribute
rect.attr('x', 50);
@@ -129,6 +132,30 @@ clipRect = clipPath.rect({ x:10, y:10, width:80, height:80 });
rect.clipTo(clipPath);
```
+This functionality requires the clip.js module which is included in the default distribution.
+
+
+### Arranging elements
+You can arrange elements within their parent SVG document using the following methods:
+
+```javascript
+// move element to the front
+rect.front();
+
+// move element to the back
+rect.back();
+
+// move element one step forward
+rect.forward();
+
+// move element one step backward
+rect.backward();
+//
+```
+
+This functionality requires the arrange.js module which is included in the default distribution.
+
+
## Compatibility
### Desktop