Comments (7)
This can close when #107 merges. Thanks.
from ember-animated.
Here are the screenshots of the issue after clicking back and forth a little bit:
from ember-animated.
Yes, making all interruptions work correctly is one of the founding reasons this library exist.
This is a bug in this particular demo, although I would like to change a default behavior to make this kind of bug harder to stumble into.
The collapse
, shuffle
, and shuffleWithStagger
transitions all need to place the sentSprites
into their final positions immediately as the transition begins:
for (let sprite of sentSprites) {
sprite.moveToFinalPosition();
}
That fixes the bug.
I would like to make this behavior the default, but it will require a corresponding change to the way motions are defined, because right now they assume this behavior.
from ember-animated.
Thanks for the reply!
transitions all need to place the
sentSprites
into their final positions immediately as the transition begins
I don't fully understand the technical solution you described (as I'm not currently a user of the lib), but I have a follow up question: will items ever "jump" in the solution you described, or will they smoothly transition from the current animation into the new one?
from ember-animated.
In more detail: the sentSprites
are present but invisible during all these transitions. That is, you always have two copies of each image: one in the sending component, and one in the receiving component. The demo always moves the receiving one and leaves the sending one invisible.
In an effort to be helpful, ember-animated pre-positions both the received and sent images at the initial position (the place where the move should start). But since the demo doesn't do anything with the sent image, the sent image lingers there in that position.
But when an interruption occurs, the sent image is still lingering in that weird position, and it can continue to influence the starting positions of the next transition.
The change I want to make is to not automatically move the sent sprites (and indeed, not automatically move any sprites), and instead require each motion to affirmatively declare when it wants a particular sprite to go to initial or final position whenever it expects one of those.
from ember-animated.
Nothing should ever jump. If you patch the code snippet I shared above into each of the three transition functions in that demo, everything is smooth no matter how many times you go back and forth clicking wildly.
Well, there is one exception in this demo, although it seems to be intentional. The z-index changes take place instantly, so that whatever images are the incoming ones jump above the outgoing ones.
Probably there is a different strategy that would avoid this, at the cost of sometimes allowing outgoing images to be above incoming ones.
from ember-animated.
Very cool. I appreciate the thorough response, @ef4 ! I wasnโt able to change the example on the site, but itโs nbd, I believe yaโ ๐ .
Since it sounds like the resolution to this problem is known, would you like me to close this issue?
from ember-animated.
Related Issues (20)
- [DOCS] Initial homepage for ember-animated has too much whitespace between lines HOT 1
- Embroider Compatibility: animated-container's dynamic Tag breaks build HOT 3
- Information on testing ember-animated in docs HOT 2
- Why do we need `assert-never` in `dependencies`? HOT 2
- Ember Global deprecation warning due to old version of ember-cli-babel in ember-animated HOT 2
- Consider public export of TransitionContext type HOT 1
- Attempted to resolve -element, which was expected to be a helper, but nothing was found HOT 5
- Embroider: ember-animated is trying to import from rsvp but that is not one of its explicit dependencies HOT 1
- 1.x breaks animated-outlet HOT 10
- TypeError: yield* (intermediate value)(intermediate value) is not iterable after removing IE11 from transpilation targets HOT 1
- `startTranslatedBy` and `endTranslatedBy` modify the initial and final bounds width/height
- AnimatedOrphans' documentation looks broken HOT 2
- Memory leak in emberAnimatedSingleton HOT 6
- Incompatibility with ember-element-helper v0.6.1 and Embroider optimized HOT 8
- Types are not resolveable with sufficiently new enough TypeScript
- Error after upgrade from `1.0.4` to `1.1.0` HOT 3
- Glint ember-animated/template-registry not found HOT 2
- v1.1.3 is missing type declarations HOT 4
- Documentation code examples rendering wrong
- App broken after upgrade from 2.0.0 to 2.0.1 HOT 1
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 ember-animated.