Fix the inifite carousel text.#8
Conversation
|
some audio tracks are simply disappearing in the new version, check what is happening. |
|
It's because of the GIF. Check out this new GIF below. 0529.mp4 |
|
it's missing the fade-in on entry and exit of the carousel |
Lucas-BRT
left a comment
There was a problem hiding this comment.
the code have a significant amount of bugs and unexpected behaviour, please fix it for progress in the PR
| const textElement = playbackbar.textContent; | ||
|
|
||
| switch (true) { | ||
| case textElement.length > 21 && textElement.length < 40: |
There was a problem hiding this comment.
this function not cover if the length is equal 40
There was a problem hiding this comment.
Fixed whitin the next commit
| <div class="navegation-background"> | ||
| <div class="navegation-button actived"> | ||
| <h1>Tracks</h1> | ||
| <head> |
There was a problem hiding this comment.
it's missing the icon declaration
There was a problem hiding this comment.
Fixed whitin the next commit.
| @@ -0,0 +1,29 @@ | |||
| import { putFade } from "./putFade.js"; | |||
There was a problem hiding this comment.
this function is redundant, the checkPlaybackbarTextAndAddCarrousel have the same purpose
There was a problem hiding this comment.
Fixed whitin the next commit
| // Function to update the carousel based on current time and animation duration | ||
| const updateCarousel = () => { | ||
| const currentTime = Date.now(); | ||
| const elapsedTime = (currentTime - animationStartTime) % animationDuration; |
There was a problem hiding this comment.
why are you getting the module of this division?
There was a problem hiding this comment.
the updateCarousel is calculating the elapsed time since the start of the animation. We achieve this by subtracting animationStartTime (the time when the animation began) from currentTime (the current time). The module operator is used to obtain the remainder of the division by animationDuration, ensuring that elapsedTime always falls within the range of 0 to animationDuration.


There is an issue with the text size. When the text size is too large, the carousel breaks before the text is fully scrolled. To address this, each text now has its own carousel. Additionally, different carousel types have been added: small for small text, medium for medium text, and large for large text.
Before:

Now:
