Skip to content

Commit 03a078c

Browse files
committed
netpyne-143 Fix size of tutorial bubble
1 parent 3d2794f commit 03a078c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

webapp/components/general/TutorialBubble.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ const TutorialBubble = ({
4141
const windowHeight = window.innerHeight;
4242
const windowWidth = window.innerWidth;
4343

44-
let x = rect1.left + (rect1.width / 2) - (width2 / 2);
45-
let y = (rect1.top - windowHeight) + rect1.height;
44+
// let x = rect1.left + (rect1.width / 2) - (width2 / 2); // bubble is aligned with center of the rectangle
45+
let x = rect1.left; // bubble is aligned with the left of the rectangle
46+
let y = (rect1.top - windowHeight) + rect1.height + rectMargin;
4647

4748
// Check if element2 is outside the viewport horizontally
4849
if (x + width2 > windowWidth) {
@@ -141,7 +142,7 @@ const TutorialBubble = ({
141142
}
142143

143144
const targetRect = DOMtarget.getBoundingClientRect();
144-
const { x, y } = calculateVisiblePosition(targetRect, 150, 300);
145+
const { x, y } = calculateVisiblePosition(targetRect, 400, 184);
145146

146147
const hasOtherSteps = requestedTourStep < steps.length;
147148
const nextIsVisible = nextDOMtarget?.checkVisibility();

0 commit comments

Comments
 (0)