@curiousmedia/client-resized
v1.0.0
Published
Detect if resize event was triggered by a window resize or a scroll event.
Downloads
2
Keywords
Readme
Client Resized
Detect if resize event was triggered by a window resize or a scroll event. iOS devices trigger a resize event when scrolling down, causing the UI to collapse. This library seeks to circumvent this often undesirable iOS resize event.
Example
let cr = new ClientResized();
window.addEventListener('resize', () => {
if(cr.resized()) {
console.log('resized');
} else {
console.log('did not resize');
}
});