- Resolve mouse button in mask mode so middle-click pans instead of
inadvertently starting a mask draw, and cleanly end any active mask
stroke before panning.
- Redraw the mask brush cursor during pan so the brush outline stays
under the actual mouse position after the viewport transform changes.
- Reset interaction state on pointer up when leaving drawing modes so
stale interaction state cannot persist across gestures.
- Set the canvas cursor to grabbing when panning begins.