mirror of
https://github.com/jlengrand/d3-progress-meter.git
synced 2026-03-10 08:11:18 +00:00
Merge branch 'master' of https://github.com/Collaborne/d3-progress-meter.git
This commit is contained in:
@@ -107,14 +107,13 @@
|
||||
}
|
||||
this.percentage = Math.min(1, Math.max(0, this.percentage));
|
||||
|
||||
var host = this;
|
||||
var i = d3.interpolate(this.progress, this.percentage);
|
||||
d3.select(this).transition().tween(this.$.progress, function() {
|
||||
return function(t) {
|
||||
host.progress = i(t);
|
||||
host.$.progress.setAttribute('d', host.arc.endAngle(2 * Math.PI * host.progress)());
|
||||
};
|
||||
});
|
||||
this.progress = i(t);
|
||||
this.$.progress.setAttribute('d', this.arc.endAngle(2 * Math.PI * this.progress)());
|
||||
}.bind(this);
|
||||
}.bind(this));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user