fix: initial drag was borked

This commit is contained in:
cha0s 2020-07-15 22:37:40 -05:00
parent 01242a6994
commit e465db6e0e

View File

@ -27,7 +27,7 @@ export default function Chat() {
down: ({pageX}) => { down: ({pageX}) => {
if (ref.current) { if (ref.current) {
origin = { origin = {
left: parseInt(ref.current.style.left, 10), left: parseInt(ref.current.style.left || 0, 10),
point: pageX, point: pageX,
}; };
} }