Commit Graph

19 Commits

Author SHA1 Message Date
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
Perry Govier
29d6dc8163 fix(sideMenu): allow expose-aside-when on the right side. Closes #2207 2014-10-03 11:27:26 -05:00
Perry Govier
6495ff63ee test(refresher): clean up last refresher patch's test 2014-09-25 16:20:58 -05:00
Perry Govier
cedee5749a fix(sideMenu): Prevent is-enabled="false" from blocking current view interaction. Fixes #1973 2014-09-22 14:26:58 -05:00
Adam Bradley
6f79a5e5c8 fix(exposeAsideWhen): disable with isEnabled=false
Closes #2210
2014-09-14 23:38:35 -05:00
Adam Bradley
ed3e9e30ce fix(splitView): disable menu toggles on exposed aside
Closes #2182
2014-09-11 22:05:47 -05:00
Justin Basinger
f89f010cce fix(scrollview, content): Fixed multiple memory leaks in scrollview and content 2014-09-08 12:21:49 -05:00
Adam Bradley
e9f0fcf556 refactor(clickBlock): add click-block div to body
Instead of using pointer-events: none to disable unwanted clicks which
can cause flickering, we’re now using a click-block div that covers the
view during transitions. Similar concept to pointer-events: none
applied to the body tag, but in tests its showing to be more effective
to not cause any flickers.
2014-08-27 12:56:12 -05:00
Adam Bradley
2c3f1c9f02 feat($ionicBody): service to simplify body ele interaction
Many services/directives have to interact with the body element, and
each one has to write the same long code. The $ionicBody service
provides some useful methods to clean up and reduce redundant code.
2014-08-26 22:23:07 -05:00
Adam Bradley
04812a2da9 style(): move listController.unit.js to correct dir 2014-08-20 11:28:15 -05:00
Adam Bradley
b31f4e8e3f refactor(sideMenu): move controller logic to $ionicSideMenus 2014-08-20 11:09:48 -05:00
Perry Govier
c336e8ede8 fix(refresher): finish animating before changing icon, hide when not in use 2014-08-07 17:54:30 -05:00
Perry Govier
4e6ba5b818 refactor(scroll): minor tweak to make unit tests happy 2014-07-24 12:27:42 -05:00
Perry Govier
3d0a46efe8 fix(scroll): anchor scroll should scroll to IDs that are multiple levels beneath the scroll view. Closes #1804 2014-07-21 14:58:29 -05:00
Andrew Joslin
95d1aea4f1 chore(travis): re-enable jshint 2014-05-08 09:11:16 -06:00
Andy Joslin
053bc04fd4 refactor(sideMenuController): deregister backbutton on $destroy 2014-05-06 10:46:58 -06:00
Andy Joslin
101035593f feat(sideMenu): make android back button close side menu
Closes #1264
2014-05-06 10:44:26 -06:00
Andy Joslin
0a64075884 fix(collectionRepeat): correctly save user scroll position on back
Addresses #1157
2014-05-05 10:39:22 -06:00
Andy Joslin
14a2790749 refactor(): reorganize source files 2014-04-14 10:47:27 -06:00