Stop OSC when closing the document.
Draw the origin in the correct stroke.

Before, changing the stroke of your last element would draw the origin
in that stroke. Now we reset the current stroke.