From a3c0018d969cc7539c561e9fed2cb1bae679d6cd Mon Sep 17 00:00:00 2001 From: Rémi Tétreault Date: Fri, 17 Feb 2017 22:23:51 -0500 Subject: 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 --- src/poly.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/poly.js') 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) } } }) -- cgit v1.2.3