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

properjs-resizecontroller

0.2.2 • Public • Published

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

13

version

0.2.2

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar