Merge remote-tracking branch 'origin/netcore/dev' into netcore/netcore

This commit is contained in:
Bjarke Berg
2020-06-18 14:43:00 +02:00
7 changed files with 90 additions and 12 deletions

View File

@@ -264,19 +264,20 @@ In the following example you see how to run some custom logic before a step goes
// If the currentStep JSON object has 'skipStepIfVisible'
// It's a DOM selector - if we find it then we ship over this step
if(upcomingStep.skipStepIfVisible) {
let tryFindDomEl = document.querySelector(upcomingStep.element);
if(tryFindDomEl) {
if (upcomingStep.skipStepIfVisible) {
let tryFindDomEl = document.querySelector(upcomingStep.skipStepIfVisible);
if (tryFindDomEl) {
// check if element is visible:
if( tryFindDomEl.offsetWidth || tryFindDomEl.offsetHeight || tryFindDomEl.getClientRects().length ) {
// if it was visible then we skip the step.
nextStep();
return;
}
}
}
startStep();
// tour completed - final step
} else {
// tour completed - final step
scope.loadingStep = true;