fill-parent

2.0.0 • Public • Published

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

Package Sidebar

Install

npm i fill-parent

Weekly Downloads

3

Version

2.0.0

License

MIT

Last publish

Collaborators

  • troybetz