aboutsummaryrefslogtreecommitdiffstats
path: root/src/gradient.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/gradient.js')
-rw-r--r--src/gradient.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gradient.js b/src/gradient.js
index 4c30b43..6a2155e 100644
--- a/src/gradient.js
+++ b/src/gradient.js
@@ -52,8 +52,7 @@ SVG.extend(SVG.Gradient, {
//
SVG.extend(SVG.Defs, {
-
- /* define gradient */
+ // define gradient
gradient: function(type, block) {
var element = this.put(new SVG.Gradient(type))
@@ -78,8 +77,7 @@ SVG.Stop.prototype = new SVG.Element()
//
SVG.extend(SVG.Stop, {
-
- /* add color stops */
+ // add color stops
update: function(o) {
var index
, attr = ['opacity', 'color']
@@ -90,7 +88,7 @@ SVG.extend(SVG.Stop, {
this.style('stop-' + attr[index], o[attr[index]])
/* set attributes */
- return this.attr('offset', (o.offset != null ? o.offset : this.attrs.offset || 0) + '%')
+ return this.attr('offset', (o.offset != null ? o.offset : this.attr('offset')) + '%')
}
})