Comments (5)
Thanks @atomiks! It's a good idea, but I don't think just clearing the timeout will be enough to get the behavior you want (Try here: https://codepen.io/zaceno/pen/ELybGW).
The idea is, if you click the same square multiple times, you want it to slowly move towards its intended position from where it is now, without janking, right?
I need to think a bit more about this - but to be honest, I don't think it's a high priority issue ... more "nice to have".
from hyperapp-transitions.
You're right - clearing the timeout fixes the jank due to the old timeout firing before the new transition finishes (so it will instantly move to the new position), but the elements should transition from their current mid-transition position... does getBoundingClientRect()
work there?
It also introduces a problem of no transitions occuring sometimes if timed in a certain way.
A semi-solution would be to prevent a new position update if it's still transitioning
from hyperapp-transitions.
So I started using this module in a proper project and this is proving to be kind of a dealbreaker.
- Rapidly clicking a button that expands an item inside the transitioned list item causes glitchy transitions of the list items (normal user behavior I'd say)
- Adding a delay to stagger list items that transition in continually increments the delay each time the list items are filtered since the timeout is not cleared, causing them to not appear after a while
from hyperapp-transitions.
@atomiks While I'm still not sure if I'll be able to fix this, do you think you could provide an example like in a codepen or repo?
Especially an example of "Rapidly clicking a button that expands an item inside the transitioned list item" since I'm having trouble visualizing what's going on.
No promises, but it would be helpful to me (or hopefully someone smarter) in finding a solution.
from hyperapp-transitions.
I'm going to close for now -- I'm still open to looking into this but I need an example to work with. Reopen if you've got one!
from hyperapp-transitions.
Related Issues (19)
- Thanks HOT 1
- data to props HOT 1
- Leave does't take into account scroll position HOT 14
- First message in example is not transitioned HOT 3
- Order of transitions seems to matter HOT 3
- Exit not working with picodom HOT 6
- Using only move transitions, breaks removing element HOT 1
- Add gif to README. HOT 2
- Can we get an example using @hyperapp/html HOT 2
- cant use with @hyperapp/router HOT 9
- Work with any virtual-dom library HOT 8
- Broken examples HOT 3
- Improve CodePen examples HOT 3
- Broken CDN link HOT 1
- 'undefined' element created when using transitions HOT 6
- Partial Paints? HOT 3
- Transitions broken between 1.2.5 and 1.2.6 HOT 3
- @hyperapp/transitions@^1.0.2' is not in the npm registry. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyperapp-transitions.