Skip to content

Commit

Permalink
fix(ui): DonutModule clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Apr 26, 2018
1 parent 9fbf860 commit 802499e
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions packages/@vue/cli-ui-addon-webpack/src/components/DonutModule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ export default {
data () {
return {
dasharray: 0,
dashoffset: 0,
animating: false
dasharray: 0
}
},
Expand All @@ -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
}
},
Expand Down

0 comments on commit 802499e

Please sign in to comment.