diff options
author | Rémi Tétreault <tetreault.remi@gmail.com> | 2017-02-17 22:23:51 -0500 |
---|---|---|
committer | Rémi Tétreault <tetreault.remi@gmail.com> | 2017-02-17 22:23:51 -0500 |
commit | a3c0018d969cc7539c561e9fed2cb1bae679d6cd (patch) | |
tree | 148c4334b6c32e4eb35ea8a1012820b9b57fd473 /src/poly.js | |
parent | 0f21fd2aead7b6c409d0fb36cce55c56e9529a1a (diff) | |
download | svg.js-a3c0018d969cc7539c561e9fed2cb1bae679d6cd.tar.gz svg.js-a3c0018d969cc7539c561e9fed2cb1bae679d6cd.zip |
Make some change to the previous commit
Here is a list of the changes:
* Enhance the call to plot in the constructor of SVG.Path, SVG.Line,
SVG.Polyline and SVG.Polygon
* Rewrite the description of the tests of the method plot for SVG.TextPath,
SVG.Path, SVG.Line, SVG.Polyline and SVG.Polygon to make it more precise
* Remove the useless parens surrounding track in the method array
of SVG.TextPath
Diffstat (limited to 'src/poly.js')
-rw-r--r-- | src/poly.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/poly.js b/src/poly.js index 3bd2034..af1f075 100644 --- a/src/poly.js +++ b/src/poly.js @@ -10,7 +10,7 @@ SVG.Polyline = SVG.invent({ // Create a wrapped polyline element polyline: function(p) { // make sure plot is called as a setter - return this.put(new SVG.Polyline).plot(p != null ? p : new SVG.PointArray()) + return this.put(new SVG.Polyline).plot(p || new SVG.PointArray) } } }) @@ -27,7 +27,7 @@ SVG.Polygon = SVG.invent({ // Create a wrapped polygon element polygon: function(p) { // make sure plot is called as a setter - return this.put(new SVG.Polygon).plot(p != null ? p : new SVG.PointArray()) + return this.put(new SVG.Polygon).plot(p || new SVG.PointArray) } } }) |