summaryrefslogtreecommitdiffstats
path: root/src/viewbox.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-02-20 21:19:11 +0100
committerwout <wout@impinc.co.uk>2013-02-20 21:19:11 +0100
commit5e5593b5bd4b3f32eae42d82c0c9020025d26020 (patch)
tree7cc0d7d129165eecad141b97839c270072021a3a /src/viewbox.js
parent7529b965182e3bd950dd86557defb90daf075cde (diff)
downloadsvg.js-5e5593b5bd4b3f32eae42d82c0c9020025d26020.tar.gz
svg.js-5e5593b5bd4b3f32eae42d82c0c9020025d26020.zip
Added viewbox toString() method
Diffstat (limited to 'src/viewbox.js')
-rw-r--r--src/viewbox.js10
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