gaoryrt / number-flip

🎰 Increase your number with flipping animation
https://codesandbox.io/embed/throbbing-flower-ncm0q
MIT License
645 stars 60 forks source link

cannot be displayed correctly more than 6 digits #9

Closed seajean closed 5 years ago

seajean commented 5 years ago

like form 5 to 8 digits

比如5位数滚动到8位数

gaoryrt commented 5 years ago

try branch maxLenNum: yarn add https://github.com/gaoryrt/number-flip.git\#maxLenNum

specific the maxLenNum in option:

new Flip({
  node: $('.app'),
  from: 100,
  to: 10000,
  maxLenNum: 5
})
gaoryrt commented 5 years ago

maxLenNum optional: A number representing the number of digits, if not specified, length of digits would fits the maxLenNum of given from and to. Otherwise, length of digits won't change (see more at this issue).

tylerrrkd commented 5 years ago

@gaoryrt Hi, friend. It seems that the property maxLenNum doesn't work. And also could not be found in doc README.md https://codepen.io/Tylerrrkd/pen/aRXNNd

gaoryrt commented 5 years ago

@tylerrrkd it's in branch maxLenNum, instead of master.

gaoryrt commented 5 years ago

try branch maxLenNum: yarn add https://github.com/gaoryrt/number-flip.git\#maxLenNum

read plz, READ

image

tylerrrkd commented 5 years ago

@gaoryrt ooouch, did'n merge.. sorry

seajean commented 5 years ago

@gaoryrt 5 to 8 works now, but 8 to 5 still go wrong.

gaoryrt commented 5 years ago

@gaoryrt 5 to 8 works now, but 8 to 5 still go wrong.

Define 'wrong'.

for discussion of invisible leading zeros, see #12

luo-zhan commented 5 years ago

How to download the '.min.js' of this branch like https://unpkg.com/number-flip@1.0.28/dist/number-flip.min.js?

gaoryrt commented 5 years ago

@Robot-L seems unpkg is unavailable to do that, but you can folk and build one for your own usage. Considering the maxLenNum branch is far behind the master branch, merge it before building is recommended.