aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-03-25 21:33:50 +0100
committerwout <wout@impinc.co.uk>2013-03-25 21:33:50 +0100
commit7b0ba313154e6990fe0d11caa981dc4102193e5e (patch)
treed9940c0af72b587adc3f0b246dc95e021026d957 /README.md
parent264c100153fc45cedf94a8cc8a0174fae12e1fe8 (diff)
downloadsvg.js-7b0ba313154e6990fe0d11caa981dc4102193e5e.tar.gz
svg.js-7b0ba313154e6990fe0d11caa981dc4102193e5e.zip
Updated README
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/README.md b/README.md
index 85d3908..fb99d0b 100644
--- a/README.md
+++ b/README.md
@@ -165,6 +165,15 @@ var path = draw.path('M10,20L30,40')
For more details on path data strings, please refer to the SVG documentation:
http://www.w3.org/TR/SVG/paths.html#PathData
+Note that paths will always be positioned at x=0, y=0 on creation. This is to make the unified `move()` api possible. Svg.js assumes you are creating a path to move it afterwards. If you need to constantly update your path you probably don't want to use the `move()` method at all. In that case you can create an "unbiased" path like so:
+
+```javascript
+// path('path data', unbiased)
+var path = draw.path('M10,20L30,40', true)
+```
+
+This logic is also applicable to polylines and polygons.
+
### Image
When creating images the `width` and `height` values should be defined: