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

Once it scrolls, the MarqueeText paints outside its bounds #14

Open
mickeyl opened this issue Nov 8, 2022 · 0 comments
Open

Once it scrolls, the MarqueeText paints outside its bounds #14

mickeyl opened this issue Nov 8, 2022 · 0 comments

Comments

@mickeyl
Copy link

mickeyl commented Nov 8, 2022

Thanks for this project. I'm using the following snippet:

                let text = "Dies ist ein recht langer Text, der müsste eigentlich mal zu scrollen beginnen…"
                MarqueeText(text: text, font: UIFont.systemFont(ofSize: 20), leftFade: 16, rightFade: 16, startDelay: 3)
                    .background(.pink)
                    .border(.black)
                    .padding()

Which leads to the following video (please ignore the stuff below the marquee):

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2022-11-08.at.11.55.01.mp4

Fixing this is simple by removing the mask offsets, but then it's visible that the mask is rendered unconditionally. Is it possible to render the mask only when the text is actually scrolling and not during the delay?

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

1 participant