Fix bug in dragging x-axis while drawing
Quit drawing if we leave the graph during a drag

[#76561416]