fill-parent
v2.0.0
Published
center and scale an element to fill its parent
Downloads
3
Readme
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