// Watch layout changes
this.updateLayout();
- window.addEventListener('resize', event => {
+ window.addEventListener('resize', () => {
this.updateLayout();
}, {passive: true});
}
updateLayout() {
let newLayout = 'tablet';
if (window.innerWidth <= 1000) newLayout = 'mobile';
- if (window.innerWidth >= 1400) newLayout = 'desktop';
+ if (window.innerWidth > 1400) newLayout = 'desktop';
if (newLayout === this.lastLayoutType) return;
if (this.onDestroy) {