{ "version": 3, "sources": ["../../../Vettvangur.Frontend/src/scripts/utility/vertical-resize-check.ts"], "sourcesContent": ["/**\r\n * @type Function\r\n * @description Checking if the page was resized vertically. Preventing events firing on mobile devices when the address bar is shown/hidden.\r\n */\r\n\r\nexport let isVerticalResize = false\r\n\r\nconst verticalResizeCheck = {\r\n init(): void {\r\n let lastWindowHeight = window.innerHeight\r\n let lastWindowWidth = window.innerWidth\r\n\r\n window.addEventListener('resize', () => {\r\n const currentHeight = window.innerHeight\r\n const currentWidth = window.innerWidth\r\n isVerticalResize = currentHeight !== lastWindowHeight && currentWidth === lastWindowWidth\r\n\r\n lastWindowHeight = currentHeight\r\n lastWindowWidth = currentWidth\r\n })\r\n },\r\n}\r\n\r\nexport default verticalResizeCheck\r\n"], "mappings": "gCAKO,IAAIA,EAAmB,GAExBC,EAAsB,CAC1B,MAAa,CACX,IAAIC,EAAmB,OAAO,YAC1BC,EAAkB,OAAO,WAE7B,OAAO,iBAAiB,SAAU,IAAM,CACtC,IAAMC,EAAgB,OAAO,YACvBC,EAAe,OAAO,WAC5BL,EAAmBI,IAAkBF,GAAoBG,IAAiBF,EAE1ED,EAAmBE,EACnBD,EAAkBE,CACpB,CAAC,CACH,CACF,EAEOC,EAAQL", "names": ["isVerticalResize", "verticalResizeCheck", "lastWindowHeight", "lastWindowWidth", "currentHeight", "currentWidth", "vertical_resize_check_default"] }