You could automatically "zoom out" what they draw if they get too close to the border.
Alternatively, you could automatically "close" figures after they have at least three points, and give a hint of a handle that allows dragging a new point out of the middle of an existing side.
Alternatively, you could automatically "close" figures after they have at least three points, and give a hint of a handle that allows dragging a new point out of the middle of an existing side.