Added more logging and a variable.

isDragging is keeping track of when dragging operation is performed.