From b527c1d61f40505c27a6f7154dd8d0e127a979ed Mon Sep 17 00:00:00 2001
From: Daniel <daniel@harvey>
Date: Thu, 2 Apr 2020 10:02:23 +0200
Subject: [PATCH] WIP FIX: Tour buttons positioning failed before.

---
 src/core/js/tour.js | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/core/js/tour.js b/src/core/js/tour.js
index 904677f2..57b42681 100644
--- a/src/core/js/tour.js
+++ b/src/core/js/tour.js
@@ -481,8 +481,14 @@ var tour = new function() {
                     $(button).css("right", - Math.abs($(button).outerWidth()) / 2);
                     break;
                 case "bottom":
+                    wrapper.css("top", "100%");
+                    wrapper.css("left", "50%");
+                    wrapper.css("position", "absolute");
                     sel.append(wrapper);
-                    $(button).css("bottom", - Math.abs($(button).outerHeight()) / 2);
+                    $(button).css("margin-top", "5px");
+                    $(button).css("top", 0);
+                    $(button).css("left", 0);
+                    $(button).css("transform", "translate(-50%, 0)");
                     break;
                 case "bottom-left":
                     sel.append(wrapper);
@@ -493,8 +499,10 @@ var tour = new function() {
                     wrapper.css("top", "50%");
                     wrapper.css("position", "absolute");
                     sel.prepend(wrapper);
-                    $(button).css("top", - Math.abs($(button).outerHeight()) / 2);
-                    $(button).css("left", - Math.abs($(button).outerWidth()) / 2);
+                    $(button).css("margin-right", "5px");
+                    $(button).css("top", 0);
+                    $(button).css("right", 0);
+                    $(button).css("transform", "translate(0, -50%)");
                     break;
                 default:
                     // top-left
-- 
GitLab