aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/README.md b/README.md
index 25cf24e..85d3908 100644
--- a/README.md
+++ b/README.md
@@ -135,6 +135,13 @@ var polyline = draw.polyline('10,20 30,40 50,60')
Polyline strings consist of a list of points separated by spaces: `x,y x,y x,y`.
+As an alternative an array of points will work as well:
+
+```javascript
+// polyline([[x,y], [x,y], [x,y]])
+var polyline = draw.polyline([[10,20], [30,40], [50,60]])
+```
+
### Polygon
The polygon element, unlike the polyline element, defines a closed shape consisting of a set of connected straight line segments: