Skip to content

Layer and grid snapping systems - #1521

Merged
Keavon merged 21 commits into
masterfrom
snapping
Jan 13, 2024
Merged

Layer and grid snapping systems#1521
Keavon merged 21 commits into
masterfrom
snapping

Conversation

@0HyperCube

@0HyperCube 0HyperCube commented Dec 19, 2023

Copy link
Copy Markdown
Contributor

Closes #1206 closes #318 closes #633

Functionality

  • Free snapping
  • Contrained snapping (e.g. drag on one axis with select, or constrained aspect ratio with rectangle tool)

Tools

  • Select
  • Path
  • Pen
  • Line
  • Rect
  • Circle
  • Shape

Bounds snapping

  • edges
  • corners
  • edge midpoints
  • centres
  • overlays

Node snapping

  • paths
  • path_intersections
  • cusp_nodes
  • smooth_nodes
  • line midpoints
  • normals
  • tangents
  • overlays

Grid snapping

  • to line
  • to intersections
  • overlays
  • Customise offset and size
  • isometric grid

@github-actions
github-actions Bot temporarily deployed to graphite-dev (Preview) December 19, 2023 12:35 Inactive
@github-actions
github-actions Bot temporarily deployed to graphite-dev (Preview) December 19, 2023 12:49 Inactive
@Keavon
Keavon force-pushed the snapping branch 2 times, most recently from 82eddac to eb62315 Compare December 20, 2023 13:46
@github-actions
github-actions Bot temporarily deployed to graphite-dev (Preview) December 20, 2023 13:54 Inactive
@github-actions
github-actions Bot temporarily deployed to graphite-dev (Preview) December 22, 2023 12:13 Inactive
@github-actions
github-actions Bot temporarily deployed to graphite-dev (Preview) January 2, 2024 23:19 Inactive
@github-actions
github-actions Bot temporarily deployed to graphite-dev (Preview) January 2, 2024 23:35 Inactive
@github-actions
github-actions Bot temporarily deployed to graphite-dev (Preview) January 3, 2024 09:34 Inactive
@github-actions
github-actions Bot temporarily deployed to graphite-dev (Preview) January 3, 2024 16:11 Inactive
@github-actions
github-actions Bot temporarily deployed to graphite-dev (Preview) January 3, 2024 17:47 Inactive
@github-actions
github-actions Bot temporarily deployed to graphite-dev (Preview) January 5, 2024 15:54 Inactive
@github-actions
github-actions Bot temporarily deployed to graphite-dev (Preview) January 5, 2024 16:10 Inactive
@github-actions
github-actions Bot temporarily deployed to graphite-dev (Preview) January 7, 2024 22:05 Inactive
@Keavon Keavon changed the title Snapping system Layer and grid snapping systems Jan 8, 2024
@otdavies

otdavies commented Jan 12, 2024

Copy link
Copy Markdown
Member

Amazing work, really excited to see the isometric especially.

Note: Going to zero or negative spacing seems to cause an editor freeze.

@otdavies

otdavies commented Jan 12, 2024

Copy link
Copy Markdown
Member

Another note:

Looks like in certain situations while scaling there is a jumpy / jittery behavior while snapping..
Example:
https://github.com/GraphiteEditor/Graphite/assets/3145170/31f2cb9b-102d-4212-9797-8e1d7ece408a

File (remove the .json): example.graphite.json

@0HyperCube

Copy link
Copy Markdown
Contributor Author

Note: Going to zero or negative spacing seems to cause an editor freeze.

Fixed @otdavies

Looks like in certain situations while scaling there is a jumpy / jittery behavior while snapping..

This was caused by a NaN being produced when calculating the X distance. I added a check to avoid this and fix the behaviour.

@github-actions
github-actions Bot temporarily deployed to graphite-dev (Preview) January 12, 2024 17:08 Inactive

@Keavon Keavon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Freakin' amazing!

@Keavon
Keavon enabled auto-merge (squash) January 13, 2024 14:30
@Keavon
Keavon merged commit 456ca17 into master Jan 13, 2024
@Keavon
Keavon deleted the snapping branch January 13, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Layer-to-layer snapping system Snapping to vector edges/curves Grid snapping system

3 participants