Commit Graph

110 Commits

Author SHA1 Message Date
Adam Bradley
98ee7ee293 chore(log): use console.log instead of .debug
Console statements get removed during builds, but when testing IE 10
does not support console.debug.
2014-05-07 13:42:48 -05:00
Adam Bradley
56db0b74ba run onScroll() within triggerScrollEvent() 2014-05-06 08:30:12 -05:00
Andy Joslin
89a9ed1547 fix(scrollView): recalculate size on mousewheel scroll 2014-05-05 12:09:31 -06:00
Andy Joslin
611525ed04 style(scrollView): remove console.log 2014-05-05 11:06:01 -06:00
Andy Joslin
e6e1896629 test(collectionRepeat): finish unit tests 2014-05-05 10:31:09 -06:00
Adam Bradley
6b3c2b929a merge keyboard-fixes 2014-05-03 22:30:21 -05:00
Tim Lancina
3abab65351 android fullscreen tweaks 2014-05-02 16:57:19 -05:00
Andy Joslin
8992e7c903 fix(scrollView): stop polluting global.core 2014-04-30 09:17:06 -06:00
Max Lynch
4e2a6c0037 feat(scrollView) - pinch to zoom. Fixes #679 2014-04-29 17:11:18 -05:00
Tim Lancina
c9e07e810e poll for window height change on android 2014-04-29 15:43:51 -05:00
Tim Lancina
a7f6e1c7c6 get keyboard wip stuff working decently on android 2014-04-28 16:21:01 -05:00
Adam Bradley
da0ad75779 set onScroll when scrolling to text input, closes #1213 2014-04-28 10:04:24 -05:00
Adam Bradley
ae3318a081 refactor(keyboard): Scroll to inputs hidden by keyboard 2014-04-24 20:22:16 -05:00
Andy Joslin
934158baf5 virtualScroll: non-full-featured version, to start testing 2014-04-23 17:52:51 -06:00
Max Lynch
b220f7b30d Bringing the interval down again 2014-04-19 16:49:53 -05:00
Max Lynch
1fb28347a5 Decreasing scroll event interval 2014-04-19 16:47:55 -05:00
Adam Bradley
aac1d1773f Merge branch 'tap-refactor' 2014-04-17 15:23:58 -05:00
Tim Lancina
49d1e200a3 don't show whitespace before keyboard shows 2014-04-17 14:43:04 -05:00
Max Lynch
f7b25aa9fa Fixed infinite scroll issues 2014-04-17 12:41:22 -05:00
Adam Bradley
ee1c8dc8b7 tap updates for select elements 2014-04-17 11:07:14 -05:00
Adam Bradley
43627f77c1 created containsOrIsTextInput 2014-04-17 09:49:08 -05:00
Adam Bradley
d0047cda44 refactor(tap): Refactor tap system for improved tap/click/keyboard/scroll/focus
Overhaul of the tap system so the keyboard does not cover up focused
inputs, correctly bring up the keyboard on text input focus, disabling
focus during scroll, disabling clicks after a hold then scroll,
removing 300ms delay without additional event handlers on each element,
etc. Refactored the tap/click/scroll/activator events for more
testability, along with adding more tests.
2014-04-17 08:26:25 -05:00
Adam Bradley
8af018b1fa fix(scroll): Allow scrolling when touchstart target is an input, #1078 2014-04-08 14:28:12 -05:00
Adam Bradley
66ecec7031 fix(scroll): Fix input focus when tapped, do not scroll when target is an input, closes #1020 2014-04-02 14:22:56 -05:00
Adam Bradley
e6f562377d fix(scroll): Do not ignore taps if the target was an input, #997 2014-04-01 17:10:31 -05:00
Adam Bradley
69920157e2 remove global regex variable 2014-03-31 13:54:23 -05:00
Adam Bradley
bfcf26507f fix(scroll): Fix scroll for devices w/out dataset support, closes #976 2014-03-31 09:31:55 -05:00
flmu
f847c20847 feat($ionicScrollDelegate): add scrollBy(left,top,animate) to delegate
Closes #987
2014-03-31 05:43:13 -06:00
Adam Bradley
f1ed4b0084 fix(reorder): Prevent scroll w/ data-prevent-scroll attr on reorder btn, closes #848 2014-03-24 15:51:10 -05:00
tomkuk
cd27e1b792 fix(scrollView): browserify issue: undefined core
Closes #825

Initialize core object.

Running browserify script with required ionic raises an error: Uncaught ReferenceError: core is not defined.
2014-03-21 15:20:17 -05:00
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