TODO [?] lasso zoom [ ] 1.00000000e-9 [ ] Render through loop animationFrame with redraw_needed, request_redraw() (while panning) [ ] .setZoomLevel(), .zoomToRegion() [ ] initial_zoom: alternate init: max 0.1 unit steps e.g. 30px [ ] Restrict to given area, grid only drawn within, don't allow zoom or pan to mouve the last corner of the rendered area out of view [ ] Map background image to region [E] Constructor: Sometimes NaN appears, used in colors Drawing grid lines along the axes My attempts at precisely calculating the range (which is easy) and then have the lines positioned properly (hard) failed so far. Instead, the for loop steps from (0|0) outwards to the maximum distance, so the viewport is guaranteed to be in range. .. floor(min_vp_distance / step_size) - start loop at this index "Culling" is primitive: When drawing grid lines, we step through the full possible range and continue if the resulting screen coordinates are outside the viewport. This is already a lot faster than calculating the line and attempting to draw it.