Scrolls to the location of element with id matching $location.hash(). If
$location.hash() is blank or the id does not exist, it will scroll to
the top.
Find an element's offset, then add it to the offset of the parent
until we are at the direct child of parentEl.
Use-case: find scroll offset of any element within a scroll container
Fixes#521. Reordering now uses webkitTransform instead of
element.style.left. Additionally, as you drag the drag-element to the
top or bottom of the scroll-area, it will scroll it up or down as
allowed.
Refactors necessary: Common code from `<content>` and `<scroll>` moved
into js/ext/angular/controllers/ionicScrollController. Then `<content>`
and `<scroll>` expose the controller, and `<list>` can require it.
`<list>` then uses the controller (if exists) to pass the scrollView and
scrollEl to ReorderDrag, and ReorderDrag uses that to scroll.
Additionally, js/ext/angular/test/controller/ionicScrollController tests
much functionality that was untested before.
`content` directive stores scroll in view page history.
The history is passed down through $viewContentLoaded event, which is
broadcasted by navView directive when it loads a page.
Closes#482
Zynga Scroller slowly lowers the acceleration of scroll as soon as you pass the
boundaries. Once the acceleration reaches zero, zynga will 'flip' the
acceleration in the other direction and scroll back to within the
boundaries (bounce effect).
The problem is, sometimes as it slowly lowers the
acceleration it will get *near zero*, but not reach zero. When
acceleration gets close enough to zero, zynga stops the scrolling
because it deems it 'too slow'.
Now, the scrolling acceleration will 'flip' and go back towards being
in boundaries (bounce) when the scrolling is below a certain minimum,
not just when it is below zero.
Added support for TabBar icon badges using the attribute badge in the
tab directive.
Ex: <tab icon-on="icon ion-ios7-person" icon-off="icon
ion-ios7-person-outline" href="#/tab/myprofile" badge="3">
I’ve used the colors of the TabBar itself but inverted for the badge. I
don’t know if you’ll want to merge this straight on but I think it can
help as a start point for this feature. I’ve tried to do it as
integrated as possible.