summaryrefslogtreecommitdiffstats
path: root/src/gradient.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/gradient.js')
-rw-r--r--src/gradient.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gradient.js b/src/gradient.js
index f3ba85c..73975c5 100644
--- a/src/gradient.js
+++ b/src/gradient.js
@@ -1,9 +1,6 @@
SVG.Gradient = function(type) {
this.constructor.call(this, SVG.create(type + 'Gradient'))
- /* set unique id */
- this.attr('id', (this.id = 'svgjs_element_' + (SVG.did++)))
-
/* store type */
this.type = type
}
@@ -48,7 +45,7 @@ SVG.extend(SVG.Gradient, {
},
// Return the fill id
fill: function() {
- return 'url(#' + this.id + ')'
+ return 'url(#' + this.attr('id') + ')'
}
})