From 734b2225dfe4820966238c03fdf5b62006dc6088 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Thu, 20 Sep 2018 13:21:48 -0500 Subject: [PATCH] feat(animation): ability to disable animations w/ querystring --- .../components/animation-controller/animator.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/core/src/components/animation-controller/animator.tsx b/core/src/components/animation-controller/animator.tsx index 5601e85faf..c3a4f28eff 100644 --- a/core/src/components/animation-controller/animator.tsx +++ b/core/src/components/animation-controller/animator.tsx @@ -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; }