aboutsummaryrefslogtreecommitdiffstats
path: root/src/pattern.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/pattern.js')
-rw-r--r--src/pattern.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/pattern.js b/src/pattern.js
index c12978e..82a2339 100644
--- a/src/pattern.js
+++ b/src/pattern.js
@@ -1,31 +1,31 @@
-SVG.Pattern = function Pattern(type) {
- this.constructor.call(this, SVG.create('pattern'));
+SVG.Pattern = function(type) {
+ this.constructor.call(this, SVG.create('pattern'))
/* set unique id */
- this.attr('id', (this.id = 'svgjs_element_' + (SVG.did++)));
-};
+ this.attr('id', (this.id = 'svgjs_element_' + (SVG.did++)))
+}
// Inherit from SVG.Container
-SVG.Pattern.prototype = new SVG.Container();
+SVG.Pattern.prototype = new SVG.Container
//
SVG.extend(SVG.Pattern, {
// Return the fill id
fill: function() {
- return 'url(#' + this.id + ')';
+ return 'url(#' + this.id + ')'
}
-});
+})
//
SVG.extend(SVG.Defs, {
/* 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);
+ block(element)
return element.attr({
x: 0,
@@ -33,7 +33,7 @@ SVG.extend(SVG.Defs, {
width: width,
height: height,
patternUnits: 'userSpaceOnUse'
- });
+ })
}
}); \ No newline at end of file