Returns a set of coordinates that includes an initial offset.
For use with drag or similar events.
setInitialOffset should be called at drag start.
setInitialOffset
setPointerCoords can then be called on drag move.
setPointerCoords
And coords will reflect the coordinates of the event + the initial offset.
coords
This can then be used to position an element and it won't jump, it will stay grabbed from where the user initially grabbed it.
Returns a set of coordinates that includes an initial offset.
For use with drag or similar events.
setInitialOffsetshould be called at drag start.setPointerCoordscan then be called on drag move.And
coordswill reflect the coordinates of the event + the initial offset.This can then be used to position an element and it won't jump, it will stay grabbed from where the user initially grabbed it.