0.0.11 • Published 3 years ago

get-image-pos v0.0.11

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

Get image position coordinates

Documentation: https://antonbobrov.github.io/get-image-pos/

How to start with NPM

npm install get-image-pos

How to start with CDN

<script src="https://cdn.jsdelivr.net/npm/get-image-pos/dist/cdn/index.min.js"></script>

Example

import { getPos, applyHTMLPos } from 'get-image-pos';
// for CDN:
// window.getImagePos

const image = document.querySelector("img");

const pos = getPos({
    source: image,
    rule: 'cover',
    container: image.parentElement,
});

applyHTMLPos({
    source: image,
    rule: 'cover',
    container: image.parentElement,
});
0.0.11

3 years ago

0.0.9

3 years ago

0.0.7

3 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago