Skip to content

maxtherocket/aspect-fill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Returns the scale and new dimentions of a rectangular area that fills the contents of a parent area.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published