8aa4fd3352
Some checks are pending
Checks / Tests & checks (push) Waiting to run
Checks / Build all projects (push) Waiting to run
Deploy bemo / Deploy bemo to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Waiting to run
Deploy .com / Deploy dotcom to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Waiting to run
End to end tests / End to end tests (push) Waiting to run
Publish Canary Packages / Publish Canary Packages (push) Waiting to run
Publish VS Code Extension / Publish VS Code Extension (push) Waiting to run
high-res images are busted currently, we weren't doing `Math.min` before https://github.com/tldraw/tldraw/pull/4069 and now it's limited by the natural width of the image which is actually at odds with what's been uploaded. ## for separate PR ...actually, now that i think about it, this code isn't doing any resizing anymore - the server has the high-res images but we're only recording it as a smaller image: ``` if (isFinite(maxImageDimension)) { const resizedSize = containBoxSize(size, { w: maxImageDimension, h: maxImageDimension }) if (size !== resizedSize && MediaHelpers.isStaticImageType(file.type)) { size = resizedSize } } ``` ### Change type - [x] `bugfix` - [ ] `improvement` - [ ] `feature` - [ ] `api` - [ ] `other` ### Release notes - Images LOD: fix high-res images. |
||
---|---|---|
.. | ||
scripts | ||
src | ||
api-extractor.json | ||
api-report.md | ||
CHANGELOG.md | ||
LICENSE.md | ||
package.json | ||
README.md | ||
setupTests.js | ||
tsconfig.json |
tldraw
You can use the tldraw SDK to craft infinite canvas experiences for the web. It's perfect for collaborative whiteboards but you can use it for lots of other things, too.
Learn more at our docs site: tldraw.dev.
This package is the main entry point when using tldraw. It's part of a larger suite of packages that you can find here.
Installation
Install the tldraw
package.
npm i tldraw
Usage
import { Tldraw } from 'tldraw'
import 'tldraw/tldraw.css'
export default function () {
return <Tldraw />
}
Visit or docs site to learn more. See our examples folder for more examples.
Package development
To start the local development server:
npm run dev
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. To obtain a commercial license or learn more, please fill out this form.
Trademarks
Copyright (c) 2024-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/X at @tldraw. You can also join our discord for quick help and support and to connect with the wider tldraw verse.