Giter Site home page Giter Site logo

issue: Animations are not playing. about freya HOT 4 CLOSED

Aiving avatar Aiving commented on September 17, 2024
issue: Animations are not playing.

from freya.

Comments (4)

marc2332 avatar marc2332 commented on September 17, 2024 1

Problem: for some reason, the mouseleave (or pointerleave) event is not emitted.

For the leave events to be emitted you need to also register a mouseenter or pointerenter event, you can leave it empty but it's how currently freya detects that an element is interested in the "leave" event. I plan to improve this at some point

Question: Is there a way to track when the animation ends and then do something?

You can use a use_effect or use_memo, call !animations.is_running() && animations.has_run_yet()

from freya.

marc2332 avatar marc2332 commented on September 17, 2024

Hey, by just looking at the code I would say that the animation is not starting because the same signal it depends (info) has a new value at the same time you are starting it. This seems like a common case so I'll see what I can do about it.

from freya.

Aiving avatar Aiving commented on September 17, 2024

I fixed it using use_effect (also added RippleState).

image

However, now there is one problem and one question.

Problem: for some reason, the mouseleave (or pointerleave) event is not emitted.
Question: Is there a way to track when the animation ends and then do something?

mouseleave-problem

from freya.

Aiving avatar Aiving commented on September 17, 2024

Thanks!

from freya.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.