attach to document's mousemove event for dragging