chore(): zone.runOutsideAngular

This commit is contained in:
Adam Bradley
2015-10-15 10:29:20 -05:00
parent f2ad705cdd
commit 8a5778661b
5 changed files with 22 additions and 11 deletions

View File

@@ -130,9 +130,6 @@ import {NavController} from './nav-controller';
defaultInputs: {
'swipeBackEnabled': true
},
host: {
'[class.has-views]': '_views.length > 0'
},
template: '<template pane-anchor></template>',
directives: [forwardRef(() => NavPaneAnchor)]
})
@@ -256,6 +253,14 @@ export class Nav extends NavController {
});
}
if (this._views.length === 1) {
this._zone.runOutsideAngular(() => {
// setTimeout(function() {
// componentRef && componentRef.location && componentRef.location.nativeElement.classList.add('has-views');
// }, 100);
});
}
done();
});

View File

@@ -19,7 +19,7 @@
===========================*/
export function Swiper(container, params) {
if (!(this instanceof Swiper)) return new Swiper(container, params);
var defaults = {
@@ -987,6 +987,7 @@ export function Swiper(container, params) {
// Attach/detach events
s.initEvents = function (detach) {
console.debug('swiper initEvents', detach ? 'detach' : 'attach');
var actionDom = detach ? 'off' : 'on';
var action = detach ? 'removeEventListener' : 'addEventListener';
var touchEventsTarget = s.params.touchEventsTarget === 'container' ? s.container[0] : s.wrapper[0];

View File

@@ -49,7 +49,7 @@ export class Activator {
clearState() {
// all states should return to normal
if ((!this.app.isEnabled() || this.app.isTransitioning()) && this.clearAttempt < 30) {
if ((!this.app.isEnabled() || this.app.isTransitioning()) && this.clearAttempt < 100) {
// the app is actively disabled, so don't bother deactivating anything.
// this makes it easier on the GPU so it doesn't have to redraw any
// buttons during a transition. This will retry in XX milliseconds.