1. 30 Oct, 2020 2 commits
    • Jonathan Wilkes's avatar
    • Jonathan Wilkes's avatar
      snap to closest grid line until we've travelled half the distance to the next · fc2f67c4
      Jonathan Wilkes authored
      This gives what is to me smoother and more predictable snapping motion with
      respect to the current mouse position.
      
      For example-- imagine the grid cell size is 10 and the selected object under
      the mouse already has its top left corner aligned with vertical grid line #2.
      
      If I begin dragging that object to the left, within a single pixel of motion
      it will snap to vertical grid line #1 which is 9 pixels away from the
      object's current position.
      
      With this commit, the user must drag the object cellsize / 2 pixels before it
      snaps to a new position.
      
      To me this seems smoother as it rounds to the nearest grid line rather than
      to the grid line with the smallest coordinate value.
      fc2f67c4
  2. 29 Oct, 2020 1 commit
    • Jonathan Wilkes's avatar
      allow different grid sizes (factors of 100 for now, but easily changed) · 6dc3d006
      Jonathan Wilkes authored
      We also keep a partially transparent version of a grid for editmode. This
      allows us to keep editmode visually distinct from runmode, even if snap-to-grid
      isn't turned on.
      
      If needed it's pretty easy to make the following changes:
      
      * set the "big" cell size to something that isn't 100 (but I'm not sure how
        much control over the grid we actually want to give users-- e.g., setting
        the big cell to something for which the small cell isn't a factor
      * allow snap-to-grid to be set independently for each canvas. (But again,
        what would be the use case for this?
      6dc3d006
  3. 14 Oct, 2020 4 commits
  4. 13 Oct, 2020 12 commits
  5. 12 Oct, 2020 5 commits
  6. 11 Oct, 2020 1 commit
  7. 10 Oct, 2020 2 commits
  8. 09 Oct, 2020 7 commits
  9. 08 Oct, 2020 1 commit
  10. 07 Oct, 2020 1 commit
  11. 06 Oct, 2020 4 commits