Commit Graph

40 Commits

Author SHA1 Message Date
Adam Bradley
9513eb60ba style(jscs): code formatting 2014-12-03 01:04:40 -06:00
Andrew
7ef9ad74cf fix(slidebox): refactor for performance and stability
Closes #2336. Closes #2317. Closes #2290. Closes #2228. Closes #2067.
Closes #1890. Closes #1865. Closes #1850. Closes #1755. Closes #1688.
Closes #1578. Closes #1501. Closes #1353. Closes #1342. Closes #782.
Closes #416. Closes #2288.

BREAKING CHANGE: The slideBox's API has undergone many changes.

- **`<ion-slide-box>`** attributes have changed (see
  [documentation](http://ionicframework.com/docs/api/directive/ionSlideBox)):

  * `active-slide` has changed to `selected`. Change your code from
  this:

    ```html
    <ion-slide-box active-slide="activeSlideIndex"></ion-slide-box>
    ```

    To this:

    ```html
    <ion-slide-box selected="activeSlideIndex"></ion-slide-box>
    ```

  * `does-continue` has changed to `loop`.  Change your code from this:

    ```html
    <ion-slide-box does-continue="shouldLoop"></ion-slide-box>
    ```

    To this:

    ```html
    <ion-slide-box loop="shouldLoop"></ion-slide-box>
    ```

  * `auto-play` and `slide-interval` have been merged into `auto-play`.
  Change your code from this:

    ```html
    <!-- autoPlay is on -->
    <ion-slide-box auto-play="true" slide-interval="1000">
    </ion-slide-box>
    <!-- autoPlay is off -->
    <ion-slide-box auto-play="false" slide-interval="1000">
    </ion-slide-box>
    ```

    To this:

    ```html
    <!-- autoPlay is on -->
    <ion-slide-box auto-play="1000"></ion-slide-box>
    <!-- autoPlay is off -->
    <ion-slide-box auto-play="false"></ion-slide-box>
    ```

  * `show-pager` and `pager-click` have been removed. Use
  a child `<ion-slide-pager>` element. See the [`ion-slide-pager`
  documentation](http://ionicframework.com/docs/api/directive/ionSlidePager).
  Change your code from this:

  ```html
  <!-- pager using default click action -->
  <ion-slide-box show-pager="true">
  </ion-slide-box>
  <!-- pager with custom click action -->
  <ion-slide-box show-pager="true" pager-click="doSomething(index)">
  </ion-slide-box>
  ```

  To this:

  ```html
  <ion-slide-box>
    <!-- pager using default click action -->
    <ion-slide-pager></ion-slide-pager>
  </ion-slide-box>
  <ion-slide-box>
    <!-- pager with custom click action -->
    <ion-slide-pager ng-click="doSomething(index)"></ion-slide-pager>
  </ion-slide-box>
  ```

- **`$ionicSlideBoxDelegate`** methods have changed (see
  [documentation](http://ionicframework.com/docs/api/service/$ionicSlideBoxDelegate)):

  - `update()` has been removed. slideBox updates on its own now.

  - `stop()` has been removed. See `autoPlay()` below.

  - `start()` hass been removed. See `autoPlay()` below.

  - `slide(newIndex[, speed])` has been renamed to `select(newIndex[,
    speed]);

  - `currentIndex()` has been renamed to `selected()`.

  - `slidesCount()` has been renamed to `count()`.

  - New method `$ionicSlideBoxDelegate.autoPlay()`. Change your code
    from this:

    ```js
    // stop auto sliding
    $ionicSlideBoxDelegate.stop();
    // later... start auto sliding
    $ionicSlideBoxDelegate.start();
    ```

    To this:

    ```js
    var autoPlaySpeed = 3000; //wait 3000 seconds between changing slide
    // stop auto sliding
    $ionicSlideBoxDelegate.autoPlay(false);
    // later... start auto sliding
    $ionicSlideBoxDelegate.autoPlay(autoPlaySpeed);
    ```

  - `previous()` now returns the index of the previous slide and does
    not select. Change your code from this:

    ```js
    // select previous slide
    $ionicSlideBoxDelegate.previous();
    ```

    To this:

    ```js
    // select previous slide
    $ionicSlideBoxDelegate.select( $ionicSlideBoxDelegate.previous() );
    ```
  - `next()` now returns the index of the next slide and does
    not select. Change your code from this:

    ```js
    // select next slide
    $ionicSlideBoxDelegate.next();
    ```

    To this:

    ```js
    // select next slide
    $ionicSlideBoxDelegate.select( $ionicSlideBoxDelegate.next() );
    ```
2014-10-08 11:09:15 -06:00
Adam Bradley
25c02a3f2c add msTransform and msTransition to CSS polyfill 2014-05-07 14:10:00 -05:00
Adam Bradley
4066682381 separate tap from poly to make it easier to avoid tap logic in the future 2014-03-12 22:28:10 -05:00
Adam Bradley
98e7e1aa87 fix(tap): Do not trigger a click if the element was scrolled after touchstart/mousedown 2014-03-11 16:20:19 -05:00
Adam Bradley
6f2d6e7c5a fix(tap): Do not detect taps for input[type=file], closes #652 2014-03-10 11:45:15 -05:00
Adam Bradley
64ad982853 tapped element should only climb up a max of 5 parents 2014-03-10 11:20:11 -05:00
Adam Bradley
cfbb9d6002 jshint fix 2014-02-28 10:53:41 -06:00
Adam Bradley
2565000564 fix(list): Drag to expose list option buttons, closes #701 2014-02-28 10:42:08 -06:00
Adam Bradley
575cb1cbb9 avoid document.createElement('div') in css polyfill 2014-02-20 15:49:30 -06:00
Adam Bradley
2a68d0b5b6 increase REMOVE_PREVENT_DELAY by 50ms 2014-02-20 10:35:15 -06:00
Adam Bradley
08dcca9ffb fix jshint 2014-02-18 21:57:04 -06:00
Adam Bradley
0421b7b450 Minimal classList polyfill added 2014-02-18 21:54:15 -06:00
Adam Bradley
ec8862a7cc tap polyfill removeClickPrevent and label fixes 2014-02-18 13:27:14 -06:00
Adam Bradley
62fefc3c2d click/tap refactor 2014-02-18 09:03:10 -06:00
Andy Joslin
d056ad1fef perf(animations): throttle calls to requestAnimationFrame
Closes #582
2014-02-17 17:26:34 -05:00
Adam Bradley
f736ae510e blur active input w/ setTimeout 2014-02-16 22:07:19 -06:00
Adam Bradley
91fbcdc130 fix to prevent ghostclick of an input under a modal 2014-02-13 10:00:41 -06:00
Adam Bradley
fc8ab4b8ea fix(click): event.preventDefault() when setting focus() on an input, closes 583 2014-02-13 01:46:51 -06:00
Adam Bradley
2132d292e7 fix(click): Clicks firing twice, closes #573 2014-02-10 13:36:39 -06:00
Adam Bradley
5ebbbab5e7 run tapPolyfill for mouse pointerType too 2014-02-06 13:58:53 -06:00
Adam Bradley
00f6b17b7f toggle/checkbox tap improvements 2014-02-01 00:15:10 -06:00
Adam Bradley
aac82a1ebb initMouseEvent instead of MouseEvent, label ghost click fixes 2014-01-29 19:59:44 -06:00
Adam Bradley
4354828ce1 ng-click fixes 2014-01-29 11:20:38 -06:00
Adam Bradley
64b3181732 simplify click simulation 2014-01-28 11:25:22 -06:00
Adam Bradley
ac7a061ca3 tap detection updates 2014-01-28 11:10:05 -06:00
Adam Bradley
76fbd2dd5d do not uncheck a checked radio 2014-01-22 10:15:14 -06:00
Adam Bradley
73cad15ed2 checkbox/radio/toggle updates 2014-01-21 16:51:25 -06:00
Adam Bradley
7f7ae95498 tapPolyfill alreadyHandled fixes 2014-01-20 15:30:48 -06:00
Max Lynch
1826f455c5 Fixed #272 2013-12-07 18:00:42 -06:00
Max Lynch
21702608e2 Stuff 2013-12-07 15:17:07 -06:00
Max Lynch
91826e327e Fixed #219 2013-11-25 21:26:11 -06:00
Max Lynch
4646f5d459 Fixed #201 #215 #210 2013-11-25 14:26:34 -06:00
Max Lynch
75594db9ee Removed two click simulators that don't work on android 2013-11-23 11:58:39 -06:00
Max Lynch
04c4900c93 Fixed <a href> tap performance using polyfill 2013-11-19 19:43:12 -06:00
Max Lynch
94702e9852 Fixed new CustomEvent causing build problems 2013-11-18 21:28:23 -06:00
Max Lynch
37be253f60 Poly stuff working better 2013-11-14 21:29:02 -06:00
Max Lynch
df1d9c4d75 Fixed #138 - radio and checkbox tap/click 2013-11-14 20:19:57 -06:00
Max Lynch
74e28c61c5 Much faster pull to refresh 2013-11-08 11:22:51 -06:00
Max Lynch
32d0f48e21 Fixed #99 with requestAnimationFrame polyfill 2013-11-07 19:24:55 -06:00