Mostly concept art for UI that I never wound up using.
Getting very lost in coordinate transform math for something as trivial as zoom/pan. The below notes are not actually correct - the final version that I redid was lost. In case I ever come searching for the actual correct way to derive this, the trick was that the cursor should remain pointing at the same spot both before and after zooming. So, all that must be done is to compute the coordinates of the cursor in pre-zoom space and move post-zoom space such that the coords to the cursor remain the same. The _zoom_at() function in reg_map.js has the resulting math.