npm.io
0.6.4 • Published 2 years ago

getoffset

Licence
MIT
Version
0.6.4
Deps
4
Size
19 kB
Vulns
0
Weekly
0
Stars
13

Get Dom Offset

Why not use getBoundingClientRect (Already fixed by add scroll size but keep for remind)

  • getBoundingClientRect will not get correct top value.
  • getBoundingClientRect could resolve transform translate x, but the same can not get y.
  • In organism-react-popup we use isFollowTransform props to resolve transform issue.

Keywords