{"version":3,"sources":["webpack:///./assets/javascripts/modules/controllers/SizeGuideController.js"],"names":["SizeGuideController","Controller","rows","$","length","each","this","css","min-height","window","width","before_h","getComputedStyle","getPropertyValue","row_h","outerHeight","parseInt","h_to_put","Math","max","_this","checkRowHeight","resize","on","setTimeout","_get","prototype","__proto__","Object","getPrototypeOf","call","show","bindEvents"],"mappings":"8XAGqBA,grBAA4BC,oDAa7C,IAAIC,EAAOC,EAAE,iDACTD,EAAKE,OAAS,GAEhBF,EAAKG,KAAK,WAIR,GAFAF,EAAEG,MAAMC,KAAKC,aAAa,SAEtBL,EAAGM,QAASC,QAAU,IAAK,OAAO,EAEtC,IAAIC,EAAWF,OAAOG,iBAAiBT,EAAEG,MAAM,GAAG,WAAWO,iBAAiB,UAC1EC,EAAQX,EAAEG,MAAMS,cAEpB,GAAIC,SAASL,EAAU,IAAMG,EAAO,CAClC,IAAIG,EAAWC,KAAKC,IAAIH,SAASL,EAAU,IAAIG,GAC/CX,EAAEG,MAAMC,KAAKC,aAAaS,4CAOhC,IAAIG,EAAQd,KAEZc,EAAMC,iBAENlB,EAAEM,QAAQa,OAAO,WACfF,EAAMC,mBAGRlB,EAAE,sCAAsCoB,GAAG,QAAQ,WACjDC,WAAW,WACTJ,EAAMC,kBACN,iSAKJI,CAAAzB,EAAA0B,UAAAC,WAAAC,OAAAC,eAAA7B,EAAA0B,WAAA,OAAApB,MAAAwB,KAAAxB,MACAH,EAAE,qBAAqB4B,OACvBzB,KAAK0B,kDAlDL,OACE,6BACA,mBACA,oBACA,qBACA,oCAPehC","file":"controller-SizeGuideController.chunks.js","sourcesContent":["import Controller from '../abstracts/Controller';\nimport 'scss-templates/t-sizeguide.scss';\n\nexport default class SizeGuideController extends Controller {\n static get COMPONENTS() {\n return [\n 'SizeTableSwitcherComponent',\n 'SizeRowComponent',\n 'DropdownComponent',\n 'SizeTableComponent',\n 'SizeTableGroupComponent',\n ];\n }\n\n checkRowHeight() {\n // rows\n let rows = $('.l-s-g__size-row.show .l-s-g__size-row__sizes');\n if (rows.length > 0) {\n // let's cycle the rows\n rows.each(function(){\n // reset\n $(this).css({'min-height':'auto'});\n // check if is mobile\n if ($( window ).width() > 768) return true;\n // check the heights\n let before_h = window.getComputedStyle($(this)[0],':before').getPropertyValue('height');\n let row_h = $(this).outerHeight();\n // it the header is in 2 lines\n if (parseInt(before_h, 10) > row_h) {\n let h_to_put = Math.max(parseInt(before_h, 10),row_h);\n $(this).css({'min-height':h_to_put});\n }\n });\n }\n }\n\n bindEvents() {\n let _this = this;\n // i check the tables on small devices\n _this.checkRowHeight();\n // and on resize\n $(window).resize(function() {\n _this.checkRowHeight();\n });\n // on open size blocks\n $('.l-s-g__size-type-row__head button').on('click',function(){\n setTimeout(function(){\n _this.checkRowHeight();\n },501);\n });\n }\n\n init() {\n super.init();\n $('.jsSizeGuideLayer').show();\n this.bindEvents();\n }\n}\n"],"sourceRoot":""}