From 759e1f2e5a2e24aeaf65c7bf3395f3141096dcfc Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Wed, 18 Apr 2018 08:27:03 +0200 Subject: [PATCH] U4-11233 make sure when a tour step is marked as intro get's displayed centered, even if element is set --- .../directives/components/application/umbtour.directive.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js index 55641b6ec7..7e981c065d 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js @@ -304,6 +304,12 @@ In the following example you see how to run some custom logic before a step goes scope.elementNotFound = false; $timeout(function () { + // clear element when step as marked as intro, so it always displays in the center + if (scope.model.currentStep && scope.model.currentStep.type === "intro") { + scope.model.currentStep.element = null; + scope.model.currentStep.eventElement = null; + scope.model.currentStep.event = null; + } // if an element isn't set - show the popover in the center if(scope.model.currentStep && !scope.model.currentStep.element) {