This is super useful so needs top-level support. Also special because the grid wants to be infinite.
[x] For starters, toggle a single grid size and color that's reasonable for our current zoom level
Windows Journal "wide grid" format that I've used for so long seems to be 0.3933333" per square (roughly 21.61 x 27.97 squares on letter paper), though 0.395" (21.5 x 27.85) or 0.4" (21.25 x 27.5) might be a cleaner approximation. According to standard translations, these translate to 37.76 px or 37.92 px or 38.4 px -- or could use 38? Line width is 0.72 pt = 0.96 px. My color has been #c4e3f4.
[x] On by default?
[ ] Grid support in history view — should it in fact be an object, tracked in ObjectsDiff? Otherwise, should add pageEdit events to history so that we know whether there's a grid at any time in history.
[x] Grid support when printing (entire extent)
[ ] When panning/resizing, just draw new part of grid, and erase out-of-bounds parts? Or at least detect null change.
Finer grid snapping compared to grid display
[x] Factor 2 ("half-grid mode")
[x] Centers of triangular grid
[ ] Increase/decrease factor?
Configurable grid size
[ ] Type in "true" grid size in real units (currently ~1cm), property of page
[ ] Local-to-user grid scaling: factor 2 up/down buttons. This controls the user's desired density of grid (perhaps remembered per board).
[ ] Automatic refinement of visible grid based on zoom level. In particular, when zooming way out, show fewer grid lines, and probably make them thicker so they're visible. And when zooming in, refine by 2x to make density approximately the same, but draw the refined lines thinner (and dependent on view size)
[ ] Maybe refined grid should be dots instead of lines?
[ ] Snap to visible grid
[ ] Configuration to change 2x value, and option to turn off refinement
[ ] Configurable grid color
[ ] Grid dots instead of grid lines (as suggested below). Can still render this in linear (not quadratic) objects using custom stroke-dasharray.
[ ] Two or more levels of grid with different thickness/color?
[ ] Rotate grid (e.g. 45 degrees, or different hex orientations)
This is super useful so needs top-level support. Also special because the grid wants to be infinite.
#c4e3f4
.pageEdit
events to history so that we know whether there's a grid at any time in history.