-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support chained else #150
Comments
The best way to do this is to string several separate liquid-if's together. {{#liquid-if firstMode}}
{{/liquid-if}}
{{#liquid-if secondMode}}
{{/liquid-if}}
{{#liquid-if thirdMode}}
{{/liquid-if}} |
I did this, but maybe I didn't get the transitions right. The content that was transitioning in was coming in from the bottom-right corner. I had something like {{#liquid-if firstMode class='first-mode'}}
{{/liquid-if}}
{{#liquid-if secondMode class='second-mode'}}
{{/liquid-if}}
{{#liquid-if thirdMode class='third-mode'}}
{{/liquid-if}} and the transitions this.transition(
this.hasClass('first-mode'),
this.use('toRight'),
this.reverse('toLeft')
);
this.transition(
this.hasClass('second-mode'),
this.use('toRight'),
this.reverse('toLeft')
);
this.transition(
this.hasClass('third-mode'),
this.use('toRight'),
this.reverse('toLeft')
); |
We can take advantage of the new chained else helper support in htmlbars to make this easier. |
@ef4 has anyone given this more thought / worked any on this? |
We haven't made any new progress on this. Would be happy to support someone with time to experiment. |
i think now you can just use normal |
You can, and that works well for many use cases, but it's not exactly the same as what a full liquid-each could do. |
Is it possible to animate between more than one if-else block, something like a case statement?
I'm essentially trying to replicate the if example from the docs, but with more than two options in the dropdown.
The text was updated successfully, but these errors were encountered: