Code Monkey home page Code Monkey logo

Comments (9)

zewa666 avatar zewa666 commented on June 1, 2024

Hi @SiddiqueAhmad, could you please explain what the problem is? I didn't understand it from your question. Why should it be slow? Inside your template, let's say it's a series of LI elements, you just add the class:

<ul>
  <li repeat.for="item of serviceItems" class="au-animate">${item.name}</li>
</ul>

from animator-css.

SiddiqueAhmad avatar SiddiqueAhmad commented on June 1, 2024
<div class="col-sm-6 col-md-3 au-animate flickr-img " repeat.for="item of items">
          <a class="thumbnail">
            <img src.bind="item.itemImage"/>
          </a>
          <div class="caption">
          <h3>${item.itemName}</h3>
          <p>Retail: ${item.price}</p>
          </div>
        </div>

when i update items via service, it just become too slow

i was using au-animate class

from animator-css.

SiddiqueAhmad avatar SiddiqueAhmad commented on June 1, 2024

@zewa666 is it clear now

from animator-css.

zewa666 avatar zewa666 commented on June 1, 2024

not really sry, the only reason I could see is that you use a too long lasting animation and it feels too slow. Take a look at the skeleton navigation example and the flickr page, where we do exactly the same without any real performance issue.

from animator-css.

SiddiqueAhmad avatar SiddiqueAhmad commented on June 1, 2024

i used the same from flickr, just was trying to filter and it become dead slow, i removed the au-animate and it was all fine, i discussed the same on gitter channel too

from animator-css.

SiddiqueAhmad avatar SiddiqueAhmad commented on June 1, 2024

this is gist where i have added code
https://gist.github.com/SiddiqueAhmad/4c3d1c4c88222edd3d22

from animator-css.

zewa666 avatar zewa666 commented on June 1, 2024

can I ask you to create a github repo, reproducing the error, it's hard to spot the issue that way without seeing what animation are happing.

from animator-css.

SiddiqueAhmad avatar SiddiqueAhmad commented on June 1, 2024

yes, here it is

https://github.com/SiddiqueAhmad/aurelia-working

go to search route, click active button, click 2 3 times

from animator-css.

zewa666 avatar zewa666 commented on June 1, 2024

Thanks for the repo 👍
Ok I think I understand what you're talking about. Is it the removal of elements which acts slowly for you? This actually happens because you're using staggered animations in your example https://github.com/SiddiqueAhmad/aurelia-working/blob/master/styles/styles.css#L55

those timeouts are added up on each item and also apply for the leave-animation. So essentially reducing the staggering time or removing it at all if you don't need it would fix the issue.

Perhaps an idea would be to define 3 types of staggering classes.

  • .yourclass.au-stagger works for both enter/leave
  • .yourclass.au-stagger-enter staggering only for enter animations
  • .yourclass.au-stagger-leave staggering only for leave animations

in that case you could keep the staggered enter animations but ignore them for leave, which is triggered by setting the items array to an empty array like here https://github.com/SiddiqueAhmad/aurelia-working/blob/master/src/search.js#L35

from animator-css.

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.