summaryrefslogtreecommitdiffstats
path: root/src/poly.js
diff options
context:
space:
mode:
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)