Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flipping from 9 to 10 throws #27

Open
EliasDerHai opened this issue Jan 3, 2024 · 3 comments
Open

flipping from 9 to 10 throws #27

EliasDerHai opened this issue Jan 3, 2024 · 3 comments

Comments

@EliasDerHai
Copy link

EliasDerHai commented Jan 3, 2024

After fiddling around way too long to import this into my solidjs app I notice that this throws when incrementing to a new digit (eg. 9->10, 99->100 etc.):

Uncaught TypeError: e3.ctnrArr[r4] is undefined
    value index.js:1
    value index.js:1
    value index.js:1
    AnimatedProgressBar AnimatedProgressBar.tsx:71
    runComputation dev.js:781
    updateComputation dev.js:759
    runTop dev.js:876
    runUserEffects dev.js:989
    completeUpdates dev.js:945
    runUpdates dev.js:893
    completeUpdates dev.js:945
    runUpdates dev.js:894
    writeSignal dev.js:732
    setter dev.js:217
    triggerAnimation RightHud.tsx:13
    eventHandler dev.js:859
    delegateEvents dev.js:591
    <anonymous> CharacterCreation.tsx:64
2 index.js:1:7707
    value index.js:1
    forEach self-hosted:203
    value index.js:1
    value index.js:1
    AnimatedProgressBar AnimatedProgressBar.tsx:71
    runComputation dev.js:781
    updateComputation dev.js:759
    runTop dev.js:876
    runUserEffects dev.js:989
    completeUpdates dev.js:945
    runUpdates dev.js:893
    completeUpdates dev.js:945
    runUpdates dev.js:894
    writeSignal dev.js:732
    setter dev.js:217
    triggerAnimation RightHud.tsx:13
    eventHandler dev.js:859
    (Async: EventListener.handleEvent)
    delegateEvents dev.js:591
    <anonymous> CharacterCreation.tsx:64
@101budspencer
Copy link

solution?

@EliasDerHai
Copy link
Author

https://github.com/der-Lehmann/number-flip-animation

Not perfect (number flip over 0 is also not the best animation) but it's way better compared to this. Honestly this repos' source code is just an utter mess

@gaoryrt
Copy link
Owner

gaoryrt commented Jan 15, 2024

@EliasDerHai For solving this bug, may i ask you to provide a minimal repreducible example?

Developer must know the maximum number of digits before executing the animation. And they should set it in new Flip at first. Animations that exceed the pre-set maximum number of digits can cause an error.

set it in new Flip at first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants