aboutsummaryrefslogtreecommitdiffstats
path: root/src/circle.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/circle.js')
-rw-r--r--src/circle.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/circle.js b/src/circle.js
deleted file mode 100644
index 059813e..0000000
--- a/src/circle.js
+++ /dev/null
@@ -1,35 +0,0 @@
-
-SVG.Circle = function Circle() {
- this.constructor.call(this, SVG.create('circle'));
-};
-
-// inherit from SVG.Shape
-SVG.Circle.prototype = new SVG.Shape();
-
-// Add circle-specific functions
-SVG.extend(SVG.Circle, {
-
- // custom move function
- move: function(x, y) {
- this.attrs.x = x;
- this.attrs.y = y;
-
- return this.center();
- },
-
- // custom size function (no height value here!)
- size: function(w) {
- return this.attr('r', w / 2).center();
- },
-
- // position element by its center
- center: function(x, y) {
- var r = this.attrs.r || 0;
-
- return this.attr({
- cx: x || (this.attrs.x || 0) + r,
- cy: y || (this.attrs.y || 0) + r
- });
- }
-
-}); \ No newline at end of file