refactor(navigation): ion-nav and ion-nav-controller are separate components

* nav-nav-nav-nav-nav

* wipit

* holy async batman
This commit is contained in:
Dan Bucholtz
2017-08-24 13:31:42 -05:00
committed by GitHub
parent b4530b55dc
commit 2c6a4dcf34
18 changed files with 911 additions and 212 deletions

View File

@ -1,3 +1,5 @@
import { StencilElement } from '..';
export function isDef(v: any): boolean { return v !== undefined && v !== null; }
export function isUndef(v: any): boolean { return v === undefined || v === null; }
@ -155,10 +157,16 @@ export function swipeShouldReset(isResetDirection: boolean, isMovingFast: boolea
// 1 | 1 | 0 || 1
// 1 | 1 | 1 || 1
// The resulting expression was generated by resolving the K-map (Karnaugh map):
let shouldClose = (!isMovingFast && isOnResetZone) || (isResetDirection && isMovingFast);
return shouldClose;
return (!isMovingFast && isOnResetZone) || (isResetDirection && isMovingFast);
}
export function isReady(element: HTMLElement) {
return new Promise((resolve) => {
(element as StencilElement).componentOnReady((elm: HTMLElement) => {
resolve(elm);
});
});
/** @hidden */
export function deepCopy(obj: any) {
return JSON.parse(JSON.stringify(obj));