diff options
author | wout <wout@impinc.co.uk> | 2013-02-20 21:19:11 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-02-20 21:19:11 +0100 |
commit | 5e5593b5bd4b3f32eae42d82c0c9020025d26020 (patch) | |
tree | 7cc0d7d129165eecad141b97839c270072021a3a /src/viewbox.js | |
parent | 7529b965182e3bd950dd86557defb90daf075cde (diff) | |
download | svg.js-5e5593b5bd4b3f32eae42d82c0c9020025d26020.tar.gz svg.js-5e5593b5bd4b3f32eae42d82c0c9020025d26020.zip |
Added viewbox toString() method
Diffstat (limited to 'src/viewbox.js')
-rw-r--r-- | src/viewbox.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/viewbox.js b/src/viewbox.js index f40a76e..05fb15e 100644 --- a/src/viewbox.js +++ b/src/viewbox.js @@ -32,4 +32,12 @@ SVG.ViewBox = function(element) { /* ensure a default zoom value */ this.zoom = this.zoom || 1 -}
\ No newline at end of file +} + +SVG.extend(SVG.ViewBox, { + // Parse viewbox to string + toString: function() { + return this.x + ' ' + this.y + ' ' + this.width + ' ' + this.height + } + +})
\ No newline at end of file |