calband / calchart-redesign

Calchart 4 for the web! 🌐
https://calband.github.io/calchart-redesign/
4 stars 0 forks source link

Change step grid #181

Open samuel-stahl opened 3 years ago

samuel-stahl commented 3 years ago

Description

This PR adds a new dropdown to the top menu, Grid, which allows the user to change the grid size. However, there are some issues I would like to address, both on my end and in general.

Addresses issue #62

Problems

  1. I have not yet changed the coordinate rounding function. Could someone tells me where it is called so I can figure out how best to change it?
  2. The old logic for horizontal grid generation explicitly avoided generating grid lines on yard lines unless the yard lines were removed. However, to make it easier to extend to 1-step and 4-step grids, I changed the logic to resemble the vertical lines, and therefore redundantly generates grid lines on top of yardlines. Should we strive to keep gridline generation non-redundant, or would it be easier in the long run to keep it as I have it? For reference, the old X-Offset function is present, but commented out.
  3. Due to the dimensions of the field, the 4 Step grid leaves a small horizontal space at the bottom of the field. Should we keep 4 Step grid generation as is, or should we change it somehow?

Pre-PR checklist

Screenshots/GIFs

grid-size-1 grid-size-2 grid-size-4