b5caa53cee
Background on exported patterned shapes was not the same as on the shapes themselves. This was especially noticeable in dark mode. I'm not sure if this is the colour we want to use as this changes the existing shape colour. But it is in line to what we had a while back. In any case [generateImage](https://github.com/tldraw/tldraw/blob/main/packages/tldraw/src/lib/shapes/shared/defaultStyleDefs.tsx#L113) should be using the same colour as [HashPatternForExport](https://github.com/tldraw/tldraw/blob/main/packages/tldraw/src/lib/shapes/shared/defaultStyleDefs.tsx#L88). ### Before ![image](https://github.com/tldraw/tldraw/assets/2523721/2772818e-7461-4cea-a36b-c16c8206b9d5) ### After ![image](https://github.com/tldraw/tldraw/assets/2523721/2bbe189c-fa18-4198-b9b3-1851c2336cf1) ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Add patterned shapes. 2. Copy them as SVG. 3. Paste them. They should look the same. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Fixes an issue with copy pasting shapes as svg and png not correctly working for patterned shapes. |
||
---|---|---|
.. | ||
scripts | ||
src | ||
api-extractor.json | ||
api-report.md | ||
CHANGELOG.md | ||
LICENSE.md | ||
package.json | ||
README.md | ||
setupTests.js | ||
tsconfig.json |
tldraw
This package contains the source code for the tldraw library. Learn more at our docs site: tldraw.dev.
Installation
Install the tldraw
package.
npm i tldraw
Then start the local development server.
npm run dev
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.
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 sales@tldraw.com for more inforion about obtaining a commercial license.
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 at @tldraw or email sales@tldraw.com. You can also join our discord for quick help and support.