Skip to content

Commit 802499e

Browse files
author
Guillaume Chau
committed
fix(ui): DonutModule clean up
1 parent 9fbf860 commit 802499e

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

packages/@vue/cli-ui-addon-webpack/src/components/DonutModule.vue

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ export default {
7272
7373
data () {
7474
return {
75-
dasharray: 0,
76-
dashoffset: 0,
77-
animating: false
75+
dasharray: 0
7876
}
7977
},
8078
@@ -90,14 +88,10 @@ export default {
9088
},
9189
9290
finalDashoffset () {
93-
if (this.animating) {
94-
return this.dashoffset
91+
if (this.ratio < 0) {
92+
return -this.dasharray * this.ratio + this.dasharray
9593
} else {
96-
if (this.ratio < 0) {
97-
return -this.dasharray * this.ratio + this.dasharray
98-
} else {
99-
return (1 - this.ratio) * this.dasharray
100-
}
94+
return (1 - this.ratio) * this.dasharray
10195
}
10296
},
10397

0 commit comments

Comments
 (0)