2.0.0 • Published 9 years ago

fill-parent v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

fill-parent

Center and scale an element to fill its parent

Installation

$ npm install module-boilerplate

Usage

Pass an element to fillParent to center and scale it.

/**
 * Scales and centers`el` within `parent` while leaving 100px
 * of padding on the left/right, and 200px on top/bottom;
 */
 
var fillParent = require('fill-parent');

fillParent(el, parent, {x: 100, y: 200});

License

MIT