src/component/intro/intro.js
function _setHelperLayerPosition(helperLayer) {
    if (helperLayer) {
        //prevent error when `this._currentStep` in undefined
        if (!this._introItems[this._currentStep]) return;

        var currentElement = this._introItems[this._currentStep],
            elementPosition = _getOffset(currentElement.element),
            widthHeightPadding = 10;

        // If the target element is fixed, the tooltip should be fixed as well.
        // Otherwise, remove a fixed class that may be left over from the previous
        // step.
        if (_isFixed(currentElement.element)) {
            helperLayer.className += ' introjs-fixedTooltip';
        } else {
            helperLayer.className = helperLayer.className.replace(' introjs-fixedTooltip', '');
        }

        if (currentElement.position == 'floating') {
            widthHeightPadding = 0;
        }

        //set new position to helper layer
        helperLayer.setAttribute(
            'style',
            'width: ' +
                (elementPosition.width + widthHeightPadding) +
                'px; ' +
                'height:' +
                (elementPosition.height + widthHeightPadding) +
                'px; ' +
                'top:' +
                (elementPosition.top - 5) +
                'px;' +
                'left: ' +
                (elementPosition.left - 5) +
                'px;'
        );
    }
}
function _setHelperLayerPosition(helperLayer) {
    if (helperLayer) {
        //prevent error when `this._currentStep` in undefined
        if (!this._introItems[this._currentStep]) return;

        var currentElement = this._introItems[this._currentStep],
            elementPosition = _getOffset(currentElement.element),
            widthHeightPadding = 10;

        // If the target element is fixed, the tooltip should be fixed as well.
        // Otherwise, remove a fixed class that may be left over from the previous
        // step.
        if (_isFixed(currentElement.element)) {
            helperLayer.className += ' introjs-fixedTooltip';
        } else {
            helperLayer.className = helperLayer.className.replace(' introjs-fixedTooltip', '');
        }

        if (currentElement.position == 'floating') {
            widthHeightPadding = 0;
        }

        //set new position to helper layer
        helperLayer.setAttribute(
            'style',
            'width: ' +
                (elementPosition.width + widthHeightPadding) +
                'px; ' +
                'height:' +
                (elementPosition.height + widthHeightPadding) +
                'px; ' +
                'top:' +
                (elementPosition.top - 5) +
                'px;' +
                'left: ' +
                (elementPosition.left - 5) +
                'px;'
        );
    }
}
function _setHelperLayerPosition ( helperLayer ) { if ( helperLayer ) { //prevent error when `this._currentStep` in undefined if ( ! this . _introItems [ this . _currentStep ] ) return ; var currentElement = this . _introItems [ this . _currentStep ] , elementPosition = _getOffset ( currentElement . element ) , widthHeightPadding = 10 ; // If the target element is fixed, the tooltip should be fixed as well. // Otherwise, remove a fixed class that may be left over from the previous // step. if ( _isFixed ( currentElement . element ) ) { helperLayer . className += ' introjs-fixedTooltip' ; } else { helperLayer . className = helperLayer . className . replace ( ' introjs-fixedTooltip' , '' ) ; } if ( currentElement . position == 'floating' ) { widthHeightPadding = 0 ; } //set new position to helper layer helperLayer . setAttribute ( 'style' , 'width: ' + ( elementPosition . width + widthHeightPadding ) + 'px; ' + 'height:' + ( elementPosition . height + widthHeightPadding ) + 'px; ' + 'top:' + ( elementPosition . top - 5 ) + 'px;' + 'left: ' + ( elementPosition . left - 5 ) + 'px;' ) ; } }
Update the position of the helper layer on the screen

@api private
@method _setHelperLayerPosition
@param {Object} helperLayer
Update the position of the helper layer on the screen