From fcab9dc4d28abb27b166b7974bf07de0f9fa9fc2 Mon Sep 17 00:00:00 2001 From: wout Date: Mon, 17 Dec 2012 19:51:47 +0100 Subject: Slimmed down SVG.Shape --- src/shape.js | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'src') diff --git a/src/shape.js b/src/shape.js index 1a32a00..236a066 100644 --- a/src/shape.js +++ b/src/shape.js @@ -4,37 +4,4 @@ SVG.Shape = function Shape(element) { }; // inherit from SVG.Element -SVG.Shape.prototype = new SVG.Element(); - -// Add shape-specific functions -SVG.Utils.merge(SVG.Shape, { - - // set fill color and opacity - fill: function(f) { - if (f.color != null) - this.attr('fill', f.color); - - if (f.opacity != null) - this.attr('fill-opacity', f.opacity); - - return this; - }, - - // set stroke color and opacity - stroke: function(s) { - if (s.color) - this.attr('stroke', s.color); - - if (s.width != null) - this.attr('stroke-width', s.width); - - if (s.opacity != null) - this.attr('stroke-opacity', s.opacity); - - if (this.attrs['fill-opacity'] == null) - this.fill({ opacity: 0 }); - - return this; - } - -}); \ No newline at end of file +SVG.Shape.prototype = new SVG.Element(); \ No newline at end of file -- cgit v1.2.3