-
Notifications
You must be signed in to change notification settings - Fork 19
this.oldElement doesn't have intermediate transition values #62
Copy link
Copy link
Open
Description
Just curious if you've seen this before. I'm trying out this simple inline transition
this.transition(
this.hasClass('hello-world'),
this.use(function() {
debugger;
let duration = 5000;
if (this.oldElement) {
stop(this.oldElement);
duration = timeSpent(this.oldElement, 'fade-in');
}
if (this.oldElement) {
return animate(this.oldElement, { opacity: 0 }, { duration });
} else {
return animate(this.newElement, { opacity: 1 }, { duration }, 'fade-in');
}
})
)with a simple toggle
{{#if showHello}}
{{#liquid-wormhole class="hello-world"}}
Hello, World!
{{/liquid-wormhole}}
{{/if}}The transition is being matched & run, but I'm noticing that if I click the button then click it again, there is a this.oldElement, but I don't get it with its transitioning values. In other words, if the opacity is at 0.33 when I click the button the second time, in normal Liquid Fire situations I would be able to see that (and thus smoothly transition from the intermediate state back to the initial state). But here I think something is being re-rendered, because this.oldElement doesn't have any of those intermediate values.
Any idea why, or is that re-rendering behavior an expected part of the implementation?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels