4d0aff8f01
Taking the opportunity for some last-minute low-consequence breaking changes before 2.0, this diff does some prep work for adding a new snapping API by making the distinction between the two types of snapping a bit clearer and cleaning up some naming. - `SnapManager` has had most of the actual snapping logic moved into two properties: `shapeBounds` (for snapping shape bounds on translate and resize) and `handles` (for snapping handles) - `SnapLine`s are renamed to `SnapIndicator`s. The 'line' name was a bit confusing because not all of these indicators are lines (the new vertex snap type will be a single point) I'm not too worried about this being a breaking change as it touches an area of the API that I'd be very surprised if more than a couple of people were using. ### Change Type - [x] `major` — Breaking change ### Test Plan - No user-facing changes. ### Release Notes - `SnapLine`s are now called `SnapIndicator`s - Snapping methods moved from `editor.snaps` to `editor.snaps.shapeBounds` and `editor.snaps.handles` depending on the type of snapping you're trying to do. |
||
---|---|---|
.. | ||
e2e | ||
public | ||
src | ||
.gitignore | ||
LICENSE.md | ||
package.json | ||
README.md | ||
tsconfig.json | ||
vercel.json | ||
vite.config.ts |
@tldraw/example
Community
Have questions, comments or feedback? Join our discord or start a discussion.
Distributions
You can find tldraw on npm here.
Contribution
Please see our contributing guide. Found a bug? Please submit an issue.
License
The tldraw source code and its distributions are provided under the tldraw license. This license does not permit commercial use.
If you wish to use this project in commercial product, you need to purchase a commercial license. Please contact us at hello@tldraw.com for more inforion about obtaining a commercial license.
Trademarks
Copyright (c) 2023-present tldraw Inc. The tldraw name and logo are trademarks of tldraw. Please see our trademark guidelines for info on acceptable usage.
Contact
Find us on Twitter at @tldraw or email hello@tldraw.com. You can also join our discord for quick help and support.