Commit Graph

80 Commits

Author SHA1 Message Date
Andy Joslin
dbe4e3901d feat(ionic): remove all delegates
BREAKING CHANGE: $ionicScrollDelegate, $ionicSlideBoxDelegate, and
$ionicSideMenuDelegate have been removed.

  - $ionicScrollDelegate has been changed to $ionicScrollController.
    Documentation:
    [ionContent](
    http://ajoslin.github.io/docs/nightly/api/directive/ionContent),
    [ionScroll](
    http://ajoslin.github.io/docs/nightly/api/directive/ionScroll)

    Change your code from this:

    ```html
    <ion-content ng-controller="MyCtrl">
      <button ng-click="scrollBottom()">Scroll to bottom!</button>
    </ion-content>
    ```
    ```js
    function MyCtrl($scope, $ionicScrollDelegate) {
      $scope.scrollBottom = function() {
        $ionicScrollDelegate.scrollBottom();
      };
    }
    ```

    To this:

    ```html
    <!-- optional attr controller-bind, see docs -->
    <ion-content ng-controller="MyCtrl">
      <button ng-click="scrollBottom()">Scroll to bottom!</button>
    </ion-content>
    ```
    ```js
    function MyCtrl($scope) {
      $scope.scrollBottom = function() {
        $scope.$ionicScrollController.scrollBottom();
      };
    }
    ```

  - $ionicSideMenuDelegate has been changed to
    $ionicSideMenusController. Documentation:
    [ionSideMenus](http://ajoslin.github.io/docs/nightly/api/directive/ionSideMenus)

    Change your code from this:

    ```html
    <ion-side-menus>
      <ion-side-menu side="left">Side Menu Left</ion-side-menu>
      <ion-pane ion-side-menu-content ng-controller="MyCtrl">
        <button ng-click="toggleLeftMenu()">
          Toggle Left Menu!
        </button>
      </ion-pane>
    </ion-side-menus>
    ```
    ```js
    function MyCtrl($scope, $ionicSideMenuDelegate) {
      $scope.toggleLeftMenu = function() {
        $ionicSideMenuDelegate.toggleLeft();
      };
    }
    ```

    To this:

    ```html
    <!-- optional attr controller-bind, see documentation -->
    <ion-side-menus>
      <ion-side-menu side="left">Side Menu Left</ion-side-menu>
      <ion-pane ion-side-menu-content ng-controller="MyCtrl">
        <button ng-click="toggleLeftMenu()">
          Toggle Left Menu!
        </button>
      </ion-pane>
    </ion-side-menus>
    ```
    ```js
    function MyCtrl($scope) {
      $scope.toggleLeftMenu = function() {
        $scope.$ionicSideMenuController.toggleLeft();
      };
    }
    ```

  - $ionicSlideBoxDelegate has been removed and upgraded to
    $ionicSlideBoxController. It had only one method that
    was unneeded.  [Documentation](
    http://ajoslin.github.io/docs/nightly/api/directive/ionSlideBox)
2014-03-19 11:51:07 -06:00
Max Lynch
d5a695757a fix(scrollView): show bar with mouse wheel. Fixes #809 2014-03-16 21:39:40 -05:00
Max Lynch
cb686636cd fix(scrollView): don't show bars if not scrolling. Fixes #805 2014-03-16 21:24:52 -05:00
Max Lynch
1b2cd5c51c Removed console log 2014-03-04 13:36:35 -06:00
Max Lynch
1b096a4251 fix(ionContent) - Fixed embedded object click. Fixes #723 2014-03-04 13:35:10 -06:00
Max Lynch
2e6f640b4a Added mousewheel support to scroll view 2014-02-19 16:30:39 -08:00
Andy Joslin
b137cb318c refactor(scrollView): remove test code 2014-02-18 10:09:45 -05:00
Andy Joslin
d056ad1fef perf(animations): throttle calls to requestAnimationFrame
Closes #582
2014-02-17 17:26:34 -05:00
Andy Joslin
39ad3e0b26 fix(scrollView): allow contenteditable element to be pressed normally
Closes #421
2014-02-17 12:12:59 -05:00
Andy Joslin
a5d964734f fix(scrollView): fix error from checking device before ready 2014-02-17 11:57:20 -05:00
Andy Joslin
1aef593f07 fix(scrollView): do not stop scrolling if stopped beyond boundaries
Addresses #482
2014-02-13 10:10:53 -05:00
Andy Joslin
4cba7aa6a9 refactor(scrollView): use defaultPrevented 2014-02-12 13:02:26 -05:00
Andy Joslin
9327ac71c7 fix(android): when keyboard comes up, ensure input is in view
This requires us to set fullscreen="false" in our cordova apps.

Uses the resize event to determine when the keyboard has been shown,
then broadcasts an event from the activeElement: 'scrollChildIntoView',
which is caught by the nearest parent scrollView.  The scrollView will
then see if that element is within the new device's height (since the
keyboard resizes the screen), and if not scroll it into view.

Additionally, when the keyboard resizes the screen we add a
`.hide-footer` class to the body, which will hide tabbars and footer
bars while the keyboard is opened.

For now, this is android only.

Closes #314.
2014-02-12 09:45:35 -05:00
Andy Joslin
63b0a31970 refactor(scrollView): restart scroll if stopped, + or -
Addresses #482
2014-02-12 07:40:26 -05:00
Andy Joslin
eed6b19b51 fix(scrollView): start scroll again if it stops beyond boundaries
Addresses #482
2014-02-11 14:38:02 -05:00
Andy Joslin
fb5a0d4c81 fix(list): css: don't make last .list on page have margin-bottom
Addresses #425
2014-02-11 11:39:15 -05:00
Andy Joslin
4cc4a18c66 fix(scrollView): nested scrollViews now work independently
Closes #278
2014-02-10 09:53:40 -05:00
Andy Joslin
4c9a4c0c62 refactor(anchorScroll): only get element ids under scrollEl 2014-02-09 18:06:05 -05:00
Andy Joslin
59c10d4f92 fix(scrollView): if bouncing past boundaries, do not stick.
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.
2014-02-03 12:06:33 -05:00
Max Lynch
790c97a428 Fixed #461 - PTR Android 2014-01-23 09:11:40 -06:00
Max Lynch
050870e5f4 Fixed #458 2014-01-22 23:12:50 -06:00
Max Lynch
27311d5d18 Added support for offset start scroll view 2014-01-13 19:29:32 -06:00
Max Lynch
8bd8193c89 Nicer paging scroll feel 2013-12-15 18:19:04 -06:00
Max Lynch
2285c24362 Fixed #264 and #286 - snapping scroll 2013-12-12 18:49:49 -06:00
Max Lynch
edeac3321a Bad console.log, Bad! 2013-12-12 14:38:19 -06:00
Max Lynch
37c6ac81ac Fixed #317 2013-12-12 14:26:12 -06:00
Max Lynch
7044398471 Scrollbars auto fade out - #317 2013-12-12 10:51:47 -06:00
Max Lynch
098020e511 Fixed #315 - scroll size waiting 2013-12-11 17:07:10 -06:00
Max Lynch
3a801ac955 Fixed #311 - scrollbars for scroll view 2013-12-11 16:15:55 -06:00
Max Lynch
2e87fe306e Fixed #296 - scrollview dynamic sizing 2013-12-08 20:34:32 -06:00
Max Lynch
c2316856d3 Reverted jshint changes for scrollView.js 2013-12-07 19:55:29 -06:00
Adam Bradley
3cfcfc01a4 jshint fixes 2013-12-07 15:05:56 -06:00
Max Lynch
7bd2e5263d Expose an onScroll event 2013-12-05 19:30:18 -06:00
Max Lynch
41744297f8 Added more scroll padding 2013-12-04 12:37:47 -06:00
Max Lynch
4f61e91d2b Fixed #228 2013-12-03 19:50:27 -06:00
Max Lynch
8fe6e189ba Fixed #179 - overflow scroll not working 2013-11-24 23:50:19 -06:00
Max Lynch
623b78966e Fixed #124 - rubber banding when too small 2013-11-12 19:32:46 -06:00
Max Lynch
0fecad1a50 Fixed #114 - scroll view optional banding 2013-11-11 22:05:40 -06:00
Max Lynch
58dc717ab9 Reduced drag banding resistance 2013-11-11 20:34:58 -06:00
Max Lynch
262a4cc9a8 Fixed #113 - scroll bouncing regardless of window size, fixes pull to refresh 2013-11-11 16:54:01 -06:00
Max Lynch
d082c0c148 Fixed #56 - pull to drag 2013-11-08 16:58:14 -06:00
Max Lynch
7c4a37e56a On refresh opening 2013-11-08 15:44:22 -06:00
Max Lynch
8a7db90aaf Refresh and refresh callback on content directive 2013-11-08 15:32:50 -06:00
Max Lynch
f2ebba53f1 Nice pull to refresh behavior 2013-11-08 12:38:58 -06:00
Max Lynch
fcccc165e0 Added support to stop refresh 2013-11-08 11:35:26 -06:00
Max Lynch
a236f459f3 Only show refresher on drag 2013-11-08 11:28:40 -06:00
Max Lynch
74e28c61c5 Much faster pull to refresh 2013-11-08 11:22:51 -06:00
Max Lynch
1f9d60223a Fixed refresher missing bug 2013-11-07 19:47:05 -06:00
Max Lynch
32d0f48e21 Fixed #99 with requestAnimationFrame polyfill 2013-11-07 19:24:55 -06:00
Max Lynch
d37ec6fca2 Pull to refresh work for scroll #56 2013-11-07 17:38:35 -06:00