aboutsummaryrefslogtreecommitdiffstats
path: root/src/poly.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-01-29 21:20:58 +0100
committerwout <wout@impinc.co.uk>2014-01-29 21:20:58 +0100
commit5b6736666dd85f8a063b87e6c6483ea47be4391c (patch)
tree139b35c98807ac36cad095af13ef45495958b78f /src/poly.js
parent9688054367938f1e9240c2d8572e94bb0149bc77 (diff)
downloadsvg.js-5b6736666dd85f8a063b87e6c6483ea47be4391c.tar.gz
svg.js-5b6736666dd85f8a063b87e6c6483ea47be4391c.zip
Added SVG.PathArray, updated data() and bumped to v1.0rc1
Diffstat (limited to 'src/poly.js')
-rwxr-xr-xsrc/poly.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/poly.js b/src/poly.js
index 93a40fd..247ab8f 100755
--- a/src/poly.js
+++ b/src/poly.js
@@ -18,11 +18,11 @@ SVG.extend(SVG.Polyline, SVG.Polygon, {
morphArray: SVG.PointArray
// Plot new path
, plot: function(p) {
- return this.attr('points', (this.points = new SVG.PointArray(p, [[0,0]])))
+ return this.attr('points', (this.array = new SVG.PointArray(p, [[0,0]])))
}
// Move by left top corner
, move: function(x, y) {
- return this.attr('points', this.points.move(x, y))
+ return this.attr('points', this.array.move(x, y))
}
// Move by left top corner over x-axis
, x: function(x) {
@@ -46,7 +46,9 @@ SVG.extend(SVG.Polyline, SVG.Polygon, {
}
// Set element size to given width and height
, size: function(width, height) {
- return this.attr('points', this.points.size(width, height))
+ var p = this._proportionalSize(width, height)
+
+ return this.attr('points', this.array.size(p.width, p.height))
}
})