diff options
author | wout <wout@impinc.co.uk> | 2012-12-17 19:51:47 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2012-12-17 19:51:47 +0100 |
commit | fcab9dc4d28abb27b166b7974bf07de0f9fa9fc2 (patch) | |
tree | 1961429f880d0dde756664c4c345e558c97c910a /src | |
parent | 8dfec33b4fa79b89d89a07e3ae92c5d5c5f8ce73 (diff) | |
download | svg.js-fcab9dc4d28abb27b166b7974bf07de0f9fa9fc2.tar.gz svg.js-fcab9dc4d28abb27b166b7974bf07de0f9fa9fc2.zip |
Slimmed down SVG.Shape
Diffstat (limited to 'src')
-rw-r--r-- | src/shape.js | 35 |
1 files changed, 1 insertions, 34 deletions
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 |