mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
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:
@ -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));
|
||||
|
Reference in New Issue
Block a user