-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Milestone
Description
Documentation:
{
event, // source event
deltaX, // x offset (current.x - initial.x)
deltaY, // y offset (current.y - initial.y)
absX, // absolute deltaX
absY, // absolute deltaY
velocity, // √(absX^2 + absY^2) / time
dir, // direction of swipe (Left|Right|Up|Down)
}
Codebase:
const { clientX, clientY } = event.touches ? event.touches[0] : event
const [x, y] = rotateXYByAngle([clientX, clientY], props.rotationAngle)
const deltaX = state.xy[0] - x
const deltaY = state.xy[1] - y
My question here is, are clientX
and clientY
the current x and y coordinates of the mouse?
The docs says current.x minus initial.x, I was expecting that a mouse movement from left to right returns a positive value, but it's the opposite.
Am I getting something wrong here?
Metadata
Metadata
Assignees
Labels
No labels