I was exploring a change to address issue #14 and ran into an issue with the selector that was caused by the use of offsetX and offsetY in getCoordPercentage.
MouseEvent offsets give inconsistent results when dragging up and to the left rather than the more natural down and to the right. The reason could be browser implementation (it is still experimental) or it could be that nativeEvent offsets are based on target rather than currentTarget, I don't know.
To keep consistent behavior with the selector use the bounding client rect to calculate offset values for the current element.
I was exploring a change to address issue #14 and ran into an issue with the selector that was caused by the use of offsetX and offsetY in getCoordPercentage.
MouseEvent offsets give inconsistent results when dragging up and to the left rather than the more natural down and to the right. The reason could be browser implementation (it is still experimental) or it could be that nativeEvent offsets are based on target rather than currentTarget, I don't know.
To keep consistent behavior with the selector use the bounding client rect to calculate offset values for the current element.