summaryrefslogtreecommitdiffstats
path: root/src/pattern.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-06-09 11:37:26 +0100
committerwout <wout@impinc.co.uk>2013-06-09 11:37:26 +0100
commit8f03d84e43681ecca20ac028071e51a2e2bbc0c8 (patch)
treef5c11dc6c429e8459c20731ba775fa6ca794400f /src/pattern.js
parentec75128ec31aa055aca2ae7f95ad4f5cf38d12e0 (diff)
downloadsvg.js-8f03d84e43681ecca20ac028071e51a2e2bbc0c8.tar.gz
svg.js-8f03d84e43681ecca20ac028071e51a2e2bbc0c8.zip
Added deep traversing, reorganizd modules
Diffstat (limited to 'src/pattern.js')
-rw-r--r--src/pattern.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/pattern.js b/src/pattern.js
index c5f51e0..dc57e77 100644
--- a/src/pattern.js
+++ b/src/pattern.js
@@ -16,10 +16,9 @@ SVG.extend(SVG.Pattern, {
//
SVG.extend(SVG.Defs, {
-
- /* define gradient */
+ // Define gradient
pattern: function(width, height, block) {
- var element = this.put(new SVG.Pattern())
+ var element = this.put(new SVG.Pattern)
/* invoke passed block */
block(element)
@@ -33,4 +32,13 @@ SVG.extend(SVG.Defs, {
})
}
-}); \ No newline at end of file
+})
+
+//
+SVG.extend(SVG.Container, {
+ // Create pattern element in defs
+ pattern: function(width, height, block) {
+ return this.defs().pattern(width, height, block)
+ }
+
+}) \ No newline at end of file