mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(): zone.runOutsideAngular
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user