@haggis wrote:
Hello,
I'm scratching my head about how it's possible to initiate liquid fire slide transition by swiping on a mobile.
One problem is, that ember-gestures are always working on components. Since I've got no "fullscreen" component, the swipe events fire only when swiping over a specific component (say in the bottom right corner).
Furthermore, I don't know how to initiate a liquid fire transition from code (instead from a template).
I have a route
page/:page_id
. Its template is:{{#liquid-bind model use="betweenModel" as |currentModel|}} <h3>{{model.title}}</h3> {{/liquid-bind}}
Together with the custom transition "betweenModel" the pages slide left or right depending on the target page:
export default function() { if (this.oldValue.get('id') < this.newValue.get('id')) { // toLeft. return this.lookup('toLeft').apply(this); } else { // toRight. return this.lookup('toRight').apply(this); } }
Now I want to be able to swipe through pages in the same way on a mobile.
Has anyone done this before?
Thank you
haggis
Posts: 1
Participants: 1