1.1.0 • Published 5 years ago

sbweb-scalegorithm v1.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

Scalegorithm

Scalegorithm calculates how to properly scale a child element within a parent when conventional CSS options fail. This is useful for image scaling and cross-domain iframe situations.

Features:

  • Auto fit images in a container
  • Simulate padding around image
  • Recenter origin after scaling
  • Limit upscaling to prevent pixalation

Scale math

Instead of directly manipulating DOM elements using scaleChild(), you may also use the calc() function to calculate numerical results.

Example

Check https://codepen.io/anon/pen/qQYzOY for an example.

Build Status

1.1.0

5 years ago

1.0.0

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago