aboutsummaryrefslogtreecommitdiffstats
path: root/src/container.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-03-12 13:31:09 +0100
committerwout <wout@impinc.co.uk>2013-03-12 13:31:09 +0100
commit4bd21ec64a0e3c1d4d0acf5685b2230285c7c16b (patch)
tree0300a47ca1b263ae0cd0fdb5fe76218ceb9aa745 /src/container.js
parent6c6c82ed59533f44f8754b69d47e3b11cd6dd129 (diff)
downloadsvg.js-4bd21ec64a0e3c1d4d0acf5685b2230285c7c16b.tar.gz
svg.js-4bd21ec64a0e3c1d4d0acf5685b2230285c7c16b.zip
Added x(), y(), cx(), cy() and matrix
Diffstat (limited to 'src/container.js')
-rw-r--r--src/container.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/container.js b/src/container.js
index fd41a96..3549bee 100644
--- a/src/container.js
+++ b/src/container.js
@@ -78,12 +78,16 @@ SVG.extend(SVG.Container, {
return this.put(new SVG.Rect().size(width, height))
}
// Create circle element, based on ellipse
-, circle: function(diameter) {
- return this.ellipse(diameter)
+, circle: function(size) {
+ return this.ellipse(size, size)
}
// Create an ellipse
, ellipse: function(width, height) {
- return this.put(new SVG.Ellipse().size(width, height))
+ return this.put(new SVG.Ellipse().size(width, height).move(0, 0))
+ }
+ // Create a line element
+, line: function(x1, y1, x2, y2) {
+ return this.put(new SVG.Line().attr({ x1: x1, y1: y1, x2: x2, y2: y2 }))
}
// Create a wrapped polyline element
, polyline: function(points) {