diff options
author | wout <wout@impinc.co.uk> | 2012-12-18 13:16:25 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2012-12-18 13:16:25 +0100 |
commit | ecc7c2b21cc484a0a57cd7df02a533c65f7bde97 (patch) | |
tree | ccf3cce51e73e7dfd454d44ce366901a1242635d /src/shape.js | |
parent | 1d8f6a6bfda2c09a1fafe330ac2d91e9d38e2019 (diff) | |
download | svg.js-ecc7c2b21cc484a0a57cd7df02a533c65f7bde97.tar.gz svg.js-ecc7c2b21cc484a0a57cd7df02a533c65f7bde97.zip |
Added transform()
Diffstat (limited to 'src/shape.js')
-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 |