fix(ui): DonutModule clean up

This commit is contained in:
Guillaume Chau
2018-04-27 01:29:08 +02:00
parent 9fbf860aa3
commit 802499e532

View File

@@ -72,9 +72,7 @@ export default {
data () {
return {
dasharray: 0,
dashoffset: 0,
animating: false
dasharray: 0
}
},
@@ -90,14 +88,10 @@ export default {
},
finalDashoffset () {
if (this.animating) {
return this.dashoffset
if (this.ratio < 0) {
return -this.dasharray * this.ratio + this.dasharray
} else {
if (this.ratio < 0) {
return -this.dasharray * this.ratio + this.dasharray
} else {
return (1 - this.ratio) * this.dasharray
}
return (1 - this.ratio) * this.dasharray
}
},