summaryrefslogtreecommitdiffstats
path: root/src/poly.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-01-22 12:48:49 +0100
committerwout <wout@impinc.co.uk>2014-01-22 12:48:49 +0100
commitb27d01e9f91bff6145170ebd46857cd703480fec (patch)
treeaca9a0b30423ec4f7db769969ae5f3b25c7893df /src/poly.js
parentdf8db4b03df6740e47851907a4b901362634c50b (diff)
downloadsvg.js-b27d01e9f91bff6145170ebd46857cd703480fec.tar.gz
svg.js-b27d01e9f91bff6145170ebd46857cd703480fec.zip
Bumped to v0.33
Diffstat (limited to 'src/poly.js')
-rwxr-xr-x[-rw-r--r--]src/poly.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/poly.js b/src/poly.js
index 937960d..93a40fd 100644..100755
--- a/src/poly.js
+++ b/src/poly.js
@@ -32,6 +32,18 @@ SVG.extend(SVG.Polyline, SVG.Polygon, {
, y: function(y) {
return y == null ? this.bbox().y : this.move(this.bbox().x, y)
}
+ // Set width of element
+, width: function(width) {
+ var b = this.bbox()
+
+ return width == null ? b.width : this.size(width, b.height)
+ }
+ // Set height of element
+, height: function(height) {
+ var b = this.bbox()
+
+ return height == null ? b.height : this.size(b.width, height)
+ }
// Set element size to given width and height
, size: function(width, height) {
return this.attr('points', this.points.size(width, height))