summaryrefslogtreecommitdiffstats
path: root/src/poly.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-06-28 18:39:11 +0200
committerwout <wout@impinc.co.uk>2014-06-28 18:39:11 +0200
commit2260f5789b48dd92dccf0dd734cf59cf957e4d52 (patch)
tree2c94e66afe60e45f34db6ced5f24069ab4466c72 /src/poly.js
parent0d11ad263f193e8a585e7676deb8a60a8c103ef6 (diff)
downloadsvg.js-2260f5789b48dd92dccf0dd734cf59cf957e4d52.tar.gz
svg.js-2260f5789b48dd92dccf0dd734cf59cf957e4d52.zip
Added new SVG.Line class and working on SVG.Matrix
Diffstat (limited to 'src/poly.js')
-rwxr-xr-xsrc/poly.js24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/poly.js b/src/poly.js
index 2bf0b57..0f3b1e6 100755
--- a/src/poly.js
+++ b/src/poly.js
@@ -32,10 +32,8 @@ SVG.Polygon = SVG.invent({
// Add polygon-specific functions
SVG.extend(SVG.Polyline, SVG.Polygon, {
- // Define morphable array
- morphArray: SVG.PointArray
// Get array
-, array: function() {
+ array: function() {
return this._array || (this._array = new SVG.PointArray(this.attr('points')))
}
// Plot new path
@@ -46,26 +44,6 @@ SVG.extend(SVG.Polyline, SVG.Polygon, {
, move: function(x, y) {
return this.attr('points', this.array().move(x, y))
}
- // Move by left top corner over x-axis
-, x: function(x) {
- return x == null ? this.bbox().x : this.move(x, this.bbox().y)
- }
- // Move by left top corner over y-axis
-, 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) {
var p = proportionalSize(this.bbox(), width, height)