anton-z
4/27/2020 - 4:24 PM

Height calculation for tabs in prestige

// add in Collapsible module  
  
       setTimeout(function(){


          var currentBreakpoint = __WEBPACK_IMPORTED_MODULE_8__helper__["ResponsiveHelper"].getCurrentBreakpoint();
          var productWrapperElement = document.querySelector('.Product__Wrapper');
          var productInfoElement = document.querySelector('.Product__Info');
          var productAsideElement = document.querySelector('.Product__Aside');
          var productInfoStyles = window.getComputedStyle(productInfoElement);

          if (productAsideElement) {

            if (currentBreakpoint === 'phone' || currentBreakpoint === 'tablet') {
              productAsideElement.style.minHeight = null;
            }else{
            productWrapperElement.style.minHeight = productInfoElement.scrollHeight - parseInt(productInfoStyles.paddingTop) + 'px';          
            }
          }
        }, 400)