1.0.0 • Published 3 years ago

@curiousmedia/client-resized v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

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');
    }
});