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

Glow effect prevent the touch after version 0.3.1 #51

Closed
iTarek opened this issue Dec 13, 2023 · 3 comments · Fixed by #53
Closed

Glow effect prevent the touch after version 0.3.1 #51

iTarek opened this issue Dec 13, 2023 · 3 comments · Fixed by #53

Comments

@iTarek
Copy link

iTarek commented Dec 13, 2023

I have this code that draws multiple circles when the user touches the screen. However, I noticed that after updating to the latest version (greater than 0.3.1), the touch is not captured after the first circle. It works as normal when I remove the .conditionalEffect.

                    ForEach(Array(touches.enumerated()), id: \.element.id) { index, touchInfo in
                        AnimatingCircle(
                            center: touchInfo.point,
                            index: index,
                            winnerIndex: winnerIndex
                        )
                        .id(index)
                        .conditionalEffect(
                            .repeat(.glow(color: winnerIndex == nil ? .white : .green, radius: 100), every: 1.0),
                            condition: getWinnerWorker != nil
                        )
                    }

I believe this issue existed previously and you resolved it. Could you please fix it again, as I am currently using version 0.3.1?

@robb
Copy link
Contributor

robb commented Dec 14, 2023

I'm currently traveling but I think that may have been a minor regression in Open Sourcing, should be a single allowsTouches(false)?

@iTarek
Copy link
Author

iTarek commented Dec 15, 2023

Thank you, Robb. I appreciate you taking time out of your busy travel schedule to address this minor issue. I hope you will also consider implementing feature #52.

Please merge this fix onto the main repository when you return from your trip. I wish you a pleasant journey. By the way, I live in Egypt you welcome anytime :)

@mergesort
Copy link
Collaborator

Hey @iTarek, I've gone ahead and merged the pull request onto main, and made a release for it.

I've also been thinking about the best way to implement #52, I think it's a very good suggestion but would like for it to be a little more extensible than the initial suggestion you made. For example it would be good to be able to turn off Pow based on a condition like whether the user has accessibilityReduceMotion enabled, or even a conditional based on a setting specific to your app. (As an aside, you should be using the isEnabled: !UIAccessibility.isVoiceOverRunning parameter rather than a .if branch, using an .if modifier may actually cause some View identity issues.

We can continue the discussion over there when I have a little bit more time to formulate my thoughts. 🙂

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

Successfully merging a pull request may close this issue.

3 participants