aboutsummaryrefslogtreecommitdiffstats
path: root/dist/svg.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-01-02 18:21:37 +0100
committerwout <wout@impinc.co.uk>2013-01-02 18:21:37 +0100
commit0da8f1d9c9794155c29b8e8f9a0b5ca940061033 (patch)
tree41ca64065f41b90bece3e93be7ec30a3fa517b09 /dist/svg.js
parent88987d60c456f1e686edd226f4ccb45e35142cd7 (diff)
downloadsvg.js-0da8f1d9c9794155c29b8e8f9a0b5ca940061033.tar.gz
svg.js-0da8f1d9c9794155c29b8e8f9a0b5ca940061033.zip
Added SVG.Nested to create nested svg documents
Diffstat (limited to 'dist/svg.js')
-rw-r--r--dist/svg.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/dist/svg.js b/dist/svg.js
index f8b3366..c7943c2 100644
--- a/dist/svg.js
+++ b/dist/svg.js
@@ -1,4 +1,4 @@
-/* svg.js v0.1-53-g5e7c26e - svg container element event group arrange defs mask gradient doc shape wrap rect ellipse poly path image text sugar - svgjs.com/license */
+/* svg.js v0.1-54-g88987d6 - svg container element event group arrange defs mask gradient doc shape wrap rect ellipse poly path image text nested sugar - svgjs.com/license */
(function() {
this.SVG = {
@@ -138,6 +138,11 @@
return this.put(new SVG.Text().text(t));
},
+ // create nested svg document
+ nested: function(s) {
+ return this.put(new SVG.Nested());
+ },
+
// create element in defs
gradient: function(t, b) {
return this.defs().gradient(t, b);
@@ -1018,6 +1023,17 @@
});
+ SVG.Nested = function Nested() {
+ this.constructor.call(this, SVG.create('svg'));
+ this.attr('overflow', 'visible');
+ };
+
+ // inherit from SVG.Element
+ SVG.Nested.prototype = new SVG.Element();
+
+ // include the container object
+ SVG.extend(SVG.Nested, SVG.Container);
+
var _strokeAttr = ['width', 'opacity', 'linecap', 'linejoin', 'miterlimit', 'dasharray', 'dashoffset'],
_fillAttr = ['opacity', 'rule'];