Closed UMSF-K13-3-Sahan closed 1 year ago
I think this happend cuz in _checkLeft you set correct style.right for middle align
export default function checkLeft(
targetOffset,
tooltipLayerStyleRight,
tooltipOffset,
tooltipLayer
) {
if (
targetOffset.left +
targetOffset.width -
tooltipLayerStyleRight -
tooltipOffset.width <
0
) {
// off the left side of the window
tooltipLayer.style.left = `${-targetOffset.left}px`;
return false;
}
**tooltipLayer.style.right = `${tooltipLayerStyleRight}px`;** !!!!!
return true;
}
tooltipLayer.style.right = ${tooltipLayerStyleRight}px
;
and then right after it in placeTooltip.js 346 you set null to style.right.
case "bottom-middle-aligned":
arrowLayer.className = "introjs-arrow top-middle";
// a fix for middle aligned hints
if (hintMode) {
tooltipLayerStyleLeftRight += 5;
}
if (
checkLeft(
targetOffset,
tooltipLayerStyleLeftRight,
tooltipOffset,
tooltipLayer
)
) {
**tooltipLayer.style.right = null;** !!!!
checkRight(
targetOffset,
tooltipLayerStyleLeftRight,
tooltipOffset,
windowSize,
tooltipLayer
);
}
tooltipLayer.style.top = `${targetOffset.height + 20}px`;
break;
tooltipLayer.style.right = null;
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description
Step`s tooltip with position: 'bottom-middle-aligned' aligned for left side
Expected Behavior
Step`s tooltip with position: 'bottom-middle-aligned' middle aligned
Example (recommended)
Example
Environment (optional)
Latest version of introJS (6.0). Latest versions of Firefox and Chrome.