feat(DomController): add DomController provider using stencil queue

This commit is contained in:
Adam Bradley
2018-04-12 11:12:12 -05:00
parent b1778102fc
commit bceece7bc1
12 changed files with 489 additions and 1719 deletions

File diff suppressed because one or more lines are too long

View File

@ -13,8 +13,15 @@ export class DomController {
}
function getQueue() {
const ionic = (window as any).Ionic;
return ionic.queue;
const Ionic = (window as any).Ionic;
if (Ionic && Ionic.queue) {
return Ionic.queue;
}
return {
read: (cb: any) => window.requestAnimationFrame(cb),
write: (cb: any) => window.requestAnimationFrame(cb)
};
}
export type RafCallback = { (timeStamp?: number): void };