From 3c706691d9edc9ef1a8e5d1790436bead3f486ff Mon Sep 17 00:00:00 2001 From: joecoolish Date: Tue, 7 Jun 2016 23:39:28 -0400 Subject: [PATCH 1/2] Delay backdrop change until popupDelay finishes In the case of animation between frames, the backdrop will instantly appear, which might bind to the elements while they are animating. By waiting until the popupDelay has finished to create the backdrop, this can be avoided. TODO: Maybe hide the previous backdrop? --- app/tour-controller.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/tour-controller.js b/app/tour-controller.js index 0b381b9..be57aeb 100644 --- a/app/tour-controller.js +++ b/app/tour-controller.js @@ -265,10 +265,18 @@ return handleEvent(step.config('onShow')).then(function () { - if (step.config('backdrop')) { - uiTourBackdrop.createForElement(step.element, step.config('preventScrolling'), step.config('fixed')); + if (!step.config('backdrop')) { + return; } + var delay = step.config('popupDelay'); + return $q(function (resolve) { + $timeout(function () { + uiTourBackdrop.createForElement(step.element, step.config('preventScrolling'), step.config('fixed')); + resolve(); + }, delay); + }) + }).then(function () { step.element.addClass('ui-tour-active-step'); From 1635aadd14de19e2e8b20b4f26768dab6d4ab340 Mon Sep 17 00:00:00 2001 From: joecoolish Date: Wed, 8 Jun 2016 08:28:24 -0400 Subject: [PATCH 2/2] Update tour-controller.js fixed JSLint --- app/tour-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/tour-controller.js b/app/tour-controller.js index be57aeb..4ee4536 100644 --- a/app/tour-controller.js +++ b/app/tour-controller.js @@ -275,7 +275,7 @@ uiTourBackdrop.createForElement(step.element, step.config('preventScrolling'), step.config('fixed')); resolve(); }, delay); - }) + }); }).then(function () {