marqueefy/marqueefy.github.io

Adjust animation-duration when window is resized

Closed this issue · 0 comments

Prerequisites

Describe the issue

The animation-duration is applied when the page loads. And is calculated based on the Marquee width and the specified Speed.

If the window is resized later, the Marquee will have to complete its animation within the animation-duration that was calculated based on earlier window size, and hence the speed will change.

In order to preserve the speed, the animation-duration has to be calculated when the page is resized.

Reduced test cases

Resize the window after page loads.

What operating system(s) are you seeing the problem on?

Linux

What browser(s) are you seeing the problem on?

Chrome

What version of Marqueefy are you using?

1.0.2