Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    properjs-resizecontrollerpublic

    ResizeController

    Window resize / orientationchange event controller using request animation frame.

    Installation

    npm install properjs-resizecontroller --save-dev

    Usage

    var ResizeController = require( "properjs-resizecontroller" ),
        resizer = new ResizeController();
     
    // Bind event 
    resizer.on( "resize", function () {
        // Handle event here 
    });

    Events

    • resize
    • resizedown
    • resizeup
    • resizewidth
    • resizeheight
    • orientationchange
    • orientationportrait
    • orientationlandscape

    Methods

    • on( event, handler )
    • getViewport() -> { width, height, orient }
    • isPortrait()
    • isLandscape()

    install

    npm i properjs-resizecontroller

    Downloadsweekly downloads

    16

    version

    0.2.2

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar