aspect-fill

1.0.1 • Public • Published

aspect-fill

build status

browser support

Returns scale and dimensions of a rectangular area that fills the parent area.

See aspect-fit for a fit calculation

Example

var fill = require("aspect-fill")
// fill(areaWidth, areaHeight, parentWidth, parentHeight);
var fillResult = fill(400, 200, 800, 400);
// fillResult == {scale:2, width:800, height:400}

Installation

npm install aspect-fill

Contributors

  • maxtherocket

MIT Licenced

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    263
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    263
  • 1.0.0
    0

Package Sidebar

Install

npm i aspect-fill

Weekly Downloads

263

Version

1.0.1

License

MIT

Last publish

Collaborators

  • maxtherocket