summaryrefslogtreecommitdiffstats
path: root/src/svg.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-02-20 19:10:03 +0100
committerwout <wout@impinc.co.uk>2013-02-20 19:10:03 +0100
commitae878fd63077d4c95f2de9053a6f0951b55239eb (patch)
tree5dba7bd42a8b5702faeb6cc12d2b4d4099841e51 /src/svg.js
parent5020240e4029a61a9620f21d7be4d9764e7723d1 (diff)
downloadsvg.js-ae878fd63077d4c95f2de9053a6f0951b55239eb.tar.gz
svg.js-ae878fd63077d4c95f2de9053a6f0951b55239eb.zip
Created separate classes for SVG.ViewBox anSVG.BBox0.6
Diffstat (limited to 'src/svg.js')
-rw-r--r--src/svg.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/svg.js b/src/svg.js
index d8088be..f017e77 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -1,16 +1,16 @@
// Use the `svg()` function to create a SVG document within a given html element. The first argument can either be an id of the element or the selected element itself.
//
-// var draw = svg('paper').size(300, 300);
-// var rect = draw.rect(100, 100).attr({ fill: '#f06' });
+// var draw = svg('paper').size(300, 300)
+// var rect = draw.rect(100, 100).attr({ fill: '#f06' })
// Shortcut for creating a svg document
this.svg = function(element) {
if (SVG.supported)
- return new SVG.Doc(element);
-};
+ return new SVG.Doc(element)
+}
// The main wrapping element
this.SVG = {
@@ -23,20 +23,20 @@ this.SVG = {
// Method for element creation
, create: function(element) {
- return document.createElementNS(this.ns, element);
+ return document.createElementNS(this.ns, element)
}
// Method for extending objects
, extend: function(object, module) {
for (var key in module)
- object.prototype[key] = module[key];
+ object.prototype[key] = module[key]
}
-};
+}
// svg support test
SVG.supported = (function() {
return !! document.createElementNS &&
- !! document.createElementNS(SVG.ns,'svg').createSVGRect;
-})();
+ !! document.createElementNS(SVG.ns,'svg').createSVGRect
+})()
if (!SVG.supported) return false; \ No newline at end of file