fix(animation): init Ionic.Animation from window

This commit is contained in:
Adam Bradley
2017-07-17 14:45:58 -05:00
parent 66008e13be
commit 673159ab2e
5 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
import { Ionic } from '@stencil/core';
const Ionic = (window as any).Ionic;
/**

View File

@ -1,4 +1,4 @@
import { Ionic } from '@stencil/core';
const Ionic = (window as any).Ionic;
/**

View File

@ -1,5 +1,5 @@
import { Animation, Menu, MenuType as IMenuType } from '../../utils/interfaces';
import { Ionic } from '@stencil/core';
const Ionic = (window as any).Ionic;
/**
@ -57,7 +57,7 @@ export class MenuType implements IMenuType {
ani.onFinish(() => {
this.isOpening = false;
done(isOpen);
}, true);
}, { clearExistingCallacks: true });
const factor = 1 - Math.min(Math.abs(velocity) / 4, 0.7);
const dur = ani.getDuration() * factor;

View File

@ -1,4 +1,4 @@
import { Ionic } from '@stencil/core';
const Ionic = (window as any).Ionic;
/**

View File

@ -1,4 +1,4 @@
import { Ionic } from '@stencil/core';
const Ionic = (window as any).Ionic;
/**