garris / TremulaJS

TremulaJS: Picture Streams + Momentum Engine + Bézier Paths + Multi-Device

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scrolling Tremula container and reaching website header/footer

klihelp opened this issue · comments

I am experimenting with the Pinterest style layout.
I also have a website navigation header and footer, horizontal/vertical layout switcher.

Scrolling is locked over tremula container, and looks like I must set Tremula container height.
I cannot push the website header up as with normal scrolling and cannot reach the website footer.

Hi @klihelp, it is hard to understand from your description what is going on. Could you maybe send some screenshots, code examples, and maybe add some more descriptive text?

I think I understand his problem, and it relates to a problem I have with Termula.

I'm using the pinterest layout with a vertical scroll. The layout of the site is a header, tremula container and footer. When reaching the bottom of the Tremula container, scrolling is still locked on to it. This prevents me from reaching the footer.

Is it possible to detach the scrolling listener when the end of the list has been reached and then re-attach it once the user scrolls back up?

For now, this casues issues with mobile devices being unable to go past the tremula container.

Thanks for the post -- I think I get it now! Put another way, when tremula reaches the end of a vertical scroll it should allow scroll events to pass to the parent layout so that the entire page will start scrolling (like native behavior when overflow-scrolling children of overflow-scrolling parent containers).

so, yes, this can be changed. Just for some context, this behaivior is actually deliberate -- it's there because in horizontal mode, many browsers will map the browser's history back and history forward behaivior to swipe and trackpad events that bubble up to the document. So TremulaJS captures these events and prevents bubbling on horizontal events (but passes vertical events so pages can still be scrolled -- it's a little bit involved in there).

In any case, I agree this behaivior is not (ever) necessary for vertical scrolls and should be modified.

There is a large block at the end of grid.js which handles all input -- you could case for vertical orientation and pass vertical scroll events onto the parent container there. Go ahead and take a look if you like -- please send a pull request if you can figure it out. Otherwise I will try to post some hints or a fix as I get some time.

Again, thanks for posting!

Update on this?

Sorry, no update here. Simply do not have time to make updates. I am happy to take PR if you want to work on your own changes.