mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
improve css deactivate fallback
This commit is contained in:
@@ -257,7 +257,7 @@ export class Activator {
|
||||
deactivate() {
|
||||
const self = this;
|
||||
|
||||
if (self.app.isTransitioning() && self.deactivateAttempt < 10) {
|
||||
if (self.app.isTransitioning() && self.deactivateAttempt < 30) {
|
||||
// the app is actively transitioning, don't bother deactivating
|
||||
// anything this makes it easier on the GPU so it doesn't
|
||||
// have to redraw any buttons during a transition
|
||||
|
||||
@@ -40,7 +40,7 @@ export class IonicApp {
|
||||
*/
|
||||
constructor() {
|
||||
this.overlays = [];
|
||||
this._transTime = 0;
|
||||
this._transDone = 0;
|
||||
|
||||
// Our component registry map
|
||||
this.components = {};
|
||||
@@ -82,8 +82,8 @@ export class IonicApp {
|
||||
* slides up, etc. After the transition completes it is set back to `false`.
|
||||
* @param {bool} isTransitioning
|
||||
*/
|
||||
setTransitioning(isTransitioning) {
|
||||
this._transTime = (isTransitioning ? Date.now() : 0);
|
||||
setTransitioning(isTransitioning, msTilDone=800) {
|
||||
this._transDone = (isTransitioning ? Date.now() + msTilDone : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -91,7 +91,7 @@ export class IonicApp {
|
||||
* @return {bool}
|
||||
*/
|
||||
isTransitioning() {
|
||||
return (this._transTime + 800 > Date.now());
|
||||
return (this._transDone > Date.now());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user