Skip to content
This repository has been archived by the owner on Oct 9, 2018. It is now read-only.

Inertial Scrolling on BB7 #47

Closed
tneil opened this issue Mar 23, 2012 · 1 comment
Closed

Inertial Scrolling on BB7 #47

tneil opened this issue Mar 23, 2012 · 1 comment

Comments

@tneil
Copy link
Collaborator

tneil commented Mar 23, 2012

Currently BB7 has overflow scrolling in divs but it could be improved using a toolkit to add inertial scrolling and elastic ends to the scroll in the same manner as we did for PlayBook

However, this gets complicated because of the need to tie in trackpad navigation with dual input touch/trackpad devices

@aaronstasis
Copy link

Hi Tim,

We had to do something like this for an app we made. We did it by:

  • adding a 'revealElement(el,runtime);' method to iScroll based on 'scrollToElement(el, runtime);' which scrolls either up or down to an element until that element's full height is revealed
  • adding iScroll.revealElement() to the onmouseover events of our blackberry focusable elements in our WebWorks app, which wasn't a big deal because we had to do that to add hover css classes anyways
  • i believe we had to modify navmode.js 's determineBoundingRect() so that the bounding rect calculations would still work based on webkit-transforms, instead of just element offsetTop/offsetLeft.

The one thing I wasn't happy with in our implementation was that i added 'padding' to the revealElement portion, so that the next element was always viewable. This was a hack-job, because I didn't want to spend enough time thinking about how to recalculate next/prev. In retrospect, I wonder if it could be corrected by treating the bounding boxes as a 'flattened' page, so that HEADER, SCROLLABLE, FOOTER would have FOOTER values offset by the entire height of the scrollable.

I haven't touched this stuff since october, so i've reforked webworks-smartphone and iscroll to see if i can re-add the code in a relevant fashion. Let me know if you're interested in that solution.

@tneil tneil closed this as completed Sep 28, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants