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

SVG elements (like motion.text) now update when given a MotionValue as children, matching HTML element behavior #2841

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

simonkarman
Copy link

@simonkarman simonkarman commented Oct 23, 2024

Fixes the issue as described in: #2578

Feature was introduced in: #1877

Changelog:

  • SVG elements (like motion.text) now update when given a MotionValue as children, matching HTML element behavior.

@simonkarman simonkarman marked this pull request as draft October 23, 2024 19:54
@simonkarman simonkarman marked this pull request as ready for review October 23, 2024 20:21
@simonkarman
Copy link
Author

@mattgperry The issue is now fixed. I'm happy to provide additional testing or troubleshooting if needed before merging.

Quick question about #1877: Was the decision intentional to implement handleChildMotionValue in HTMLVisualElement rather than DOMVisualElement?

@simonkarman simonkarman changed the title Ensure that motion.text also supports a MotionValue child SVG elements (like motion.text) now update when given a MotionValue as children, matching HTML element behavior Oct 23, 2024
delete this.childSubscription
}

const { children } = this.props
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might still be worth exploring why a children prop is set on the SVG elements.

image

Screenshot from example in Chrome macOS: http://localhost:9990/?example=SVG-Text-MotionValue-Child

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 this pull request may close these issues.

1 participant