Skip to content
Snippets Groups Projects
  1. Oct 30, 2020
    • 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. Oct 29, 2020
    • 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. Oct 14, 2020
  4. Oct 13, 2020
  5. Oct 12, 2020
  6. Oct 11, 2020
  7. Oct 10, 2020
  8. Oct 09, 2020
  9. Oct 08, 2020
  10. Oct 07, 2020
  11. Oct 06, 2020
Loading