Andy-0414 / vue-roller

number & string rolling counter
http://andy-0414.github.io/vue-roller
69 stars 8 forks source link

defaultChar property still triggers animation on start #7

Closed antoinezanardi closed 4 years ago

antoinezanardi commented 4 years ago

Looks like there is still a bug when defaultChar property is set.

When I set the property, the animation still rolls when the page loads.

I'm on latest version: v1.12.1, am I missing something ?

Thanks for your work 👍🏻 !

Andy-0414 commented 4 years ago

Could you upload the code you used? I will check and fix it now! please wait a moment!

antoinezanardi commented 4 years ago

Here is the code I used:

<VRoller :default-char="oneTargetPlayRequirementsText" :text="oneTargetPlayRequirementsText"/>

oneTargetPlayRequirementsText is a computed property defined like below:

oneTargetPlayRequirementsText() {
   return this.$t("GamePlayFieldFooter.playersTargeted", { targetsCount: this.play.targets.length, min: 1 });
},

This property is available on page load so the animation is not supposed to trigger, right ?

antoinezanardi commented 4 years ago

Ok, I just tested it again with the new version v1.12.2.

The animation doesn't roll anymore with the characters in the char-list property.

For example, I have this text with vue-roller: "5 / 5 alive"

The animation will roll for the characters /, alive because they are not in the char-list. Is it normal ?

Thanks for your fast replies, appreciated 👍🏻

Andy-0414 commented 4 years ago

It is normal to not animate characters that are not in the charList.

antoinezanardi commented 4 years ago

Indeed, they are animated. Characters in char-list are not animated but the others like / or alive are animated on page load.

Andy-0414 commented 4 years ago

I have confirmed this issue and am working on it.

Andy-0414 commented 4 years ago

Please try again with the new version.

antoinezanardi commented 4 years ago

The issue is fixed ! Thanks for your work 👌🏼