Delay backdrop change until popupDelay finishes#57
Open
joecoolish wants to merge 2 commits intobenmarch:masterfrom
Open
Delay backdrop change until popupDelay finishes#57joecoolish wants to merge 2 commits intobenmarch:masterfrom
joecoolish wants to merge 2 commits intobenmarch:masterfrom
Conversation
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?
fixed JSLint
Owner
|
Thanks, @joecoolish, I will test this out locally. |
Owner
|
Hey @joecoolish, I tested this out locally and it doesn't exactly work as expected. Since the backdrop promise doesn't resolve until after the backdrop delay, the popup also delays after the backdrop shows. For example, if the popup delay is set to 1 second, the backdrop will show up after 1 second, and then the popup will show up 1 second after that. The following modification addresses that: return handleEvent(step.config('onShow')).then(function () {
if (!step.config('backdrop')) {
return dispatchEvent(step, 'uiTourShow');
}
return $q(function (resolve) {
dispatchEvent(step, 'uiTourShow');
$timeout(function () {
uiTourBackdrop.createForElement(step.element, step.config('preventScrolling'), step.config('fixed'));
resolve();
}, step.config('popupDelay'));
});
}).then(function () {
step.element.addClass('ui-tour-active-step');
})
..... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?