15 Commits

Author SHA1 Message Date
da18868636 refactor(animations): inline css animations 2016-02-09 16:23:01 -06:00
acf12cdd15 refactor(menu): inject MenuController to control app menus
Menu has been improved to make it easier to open, close, toggle and
enable menus.
Instead of injecting `IonicApp` to find the menu component, you now
inject
`MenuController`.

Was:

```
constructor(app: IonicApp) {
  this.app = app;
}
openMenu() {
  this.app.getComponent('leftMenu').close();
}
```

Now:

To programmatically interact with any menu, you can inject the
`MenuController`
provider into any component or directive. This makes it easy get ahold
of and
control the correct menu instance. By default Ionic will find the app's
menu
without requiring a menu ID. An id attribute on an `<ion-menu>` is only
required
if there are multiple menus on the same side. If there are multiple
menus, but
on different sides, you can use the name of the side to get the correct
menu

If there's only one menu:

```
constructor(menu: MenuController) {
  this.menu = menu;
}
openMenu() {
  this.menu.close();
}
```

If there is a menu on the left and right side:

```
toggleMenu() {
  this.menu.toggle('left');
}
```

If there are multiple menus on the same side:

```
<ion-menu id="myMenuId" side="left">...</ion-menu>
<ion-menu id="otherMenuId" side="left">...</ion-menu>

closeMenu() {
  this.menu.close('myMenuId');
}
```
2016-02-04 16:47:05 -06:00
72699dbbb4 fix(menu): fix scrolling page w/ side menus
Improved which angles should allow the side menu to open, depending if
it’s a left or right menu. Also check if the distance of the drag is
longer than a side menu would get. For example, scrolling vertically
for a long ways would have a long distance, but triggering a side menu
to open would be a short distance.

Also ensure that a side menu can always be closed incase something goes
wrong.

Closes #5272
2016-02-02 16:41:35 -06:00
504540f51c feat(menu): restrain menu slide start to a specific angle
The menu curently opens and closes at any angle of slide action. In case the menu has enough items
to create a vertical scrollbar it makes it impossible for the user the scroll vertically without
affecting the slide behavior of the menu. This fix restrains the menu open/close to a specific
angle.

#5180
2016-01-25 14:22:38 +01:00
02626b9489 chore(): add types to Refresher 2016-01-14 21:04:20 -06:00
b79d6cc8ea refactor(util): use Object.assign polyfill 2016-01-11 11:17:58 -06:00
f13eab910c Fix HammerJS Pan config bug 2016-01-10 20:07:34 +00:00
639dd23a49 make the menu threshold configurable 2016-01-10 00:08:54 +00:00
0270be3305 fix blocking TS errors 2015-12-10 16:39:56 -06:00
0a1f63d3fb fix(menu): construct menu on first drag
Closes #580
2015-11-19 09:10:39 -06:00
d3e9980f9c fix(menu): enabling/disabling 2015-10-31 15:02:59 -05:00
196fbe2e01 fix(menu): drag menu to close. Fixes #189 2015-10-29 12:42:18 -05:00
3a2ffa8362 chore(): rename progressFinish to progressEnd 2015-09-22 16:08:27 -05:00
1fbdf4b10b feat(menu): drag right side 2015-09-22 16:01:14 -05:00
28c8d001e6 cache window dimensions 2015-09-13 22:34:23 -05:00