From 5e5593b5bd4b3f32eae42d82c0c9020025d26020 Mon Sep 17 00:00:00 2001 From: wout Date: Wed, 20 Feb 2013 21:19:11 +0100 Subject: Added viewbox toString() method --- src/viewbox.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3