1.0.0-beta.0 • Published 5 years ago
ph-position
Licence
—
Version
1.0.0-beta.0
Deps
0
Size
2 kB
Vulns
0
Weekly
0
Welcome to your new awesome project!
This project has been created using webpack-cli, you can now run
npm i ph-position
import getPosition from 'ph-position'
const {offsetWidth,offsetHeight} = dom
const {x,y} = PhPosition({offsetWidth,offsetHeight},target.getBoundingClientRect(),{top:boolean,dir:vt|hr|''})
dom.style.cssText = `left:${x}px,top:${y}px`