-
Notifications
You must be signed in to change notification settings - Fork 29
Popup #462
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
base: main
Are you sure you want to change the base?
Popup #462
Conversation
I've simplified your code. https://gist.github.com/alanpoon/be43c184ee90bec5992148d5b132fc5e |
I've found a way to dynamically update the animation's duration. You find the correct liveId and the correct condition to compute and update the required height. |
To test the component effects, I added two triggers — one when logging in, and another when sending a message in a room — both will trigger a popup. |
https://gist.github.com/alanpoon/be43c184ee90bec5992148d5b132fc5e Added:
Screen.Recording.2025-04-29.at.5.02.04.PM.movYou need to
|
/// | ||
/// The function does not handle the case where the live file or the nodes | ||
/// do not exist, because this should not happen in normal usage. | ||
fn use_live_duration(&mut self, cx: &mut Cx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alanpoon This method can set the value in the node
, but when I change the value of duration
, the animation doesn't play according to the new setting. That's weird. I'm guessing the animation value might have already been set before I made the change.
2025-04-23.12-14-29.webm