mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
feat(animation): ability to disable animations w/ querystring
This commit is contained in:
@ -98,12 +98,14 @@ export class Animator {
|
||||
* not have a duration, then it'll get the duration from its parent.
|
||||
*/
|
||||
getDuration(opts?: PlayOptions): number {
|
||||
if (opts && opts.duration !== undefined) {
|
||||
return opts.duration;
|
||||
} else if (this._duration !== undefined) {
|
||||
return this._duration;
|
||||
} else if (this.parent) {
|
||||
return this.parent.getDuration();
|
||||
if (!location.search.includes('ionic:animate=false')) {
|
||||
if (opts && opts.duration !== undefined) {
|
||||
return opts.duration;
|
||||
} else if (this._duration !== undefined) {
|
||||
return this._duration;
|
||||
} else if (this.parent) {
|
||||
return this.parent.getDuration();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user