Tldraw/packages/tldraw
Steve Ruiz 0d0d38361d
Don't hover locked shapes (#3575)
This PR:
- updates `getHoveredId` to `getHoveredShapeId`
- adds an option to ignore locked shapes to `Editor.getShapeAtPoint`.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `improvement` — Improving existing features

### Test Plan

1. Put two shapes on top of eachother
2. Lock the top shape
3. Hover the shape
4. The bottom shape should be hovered
5. Right click
6. The top shape should be selected 

- [x] Unit tests

### Release Notes

- Fixed a bug with locked shapes being hoverable.
2024-04-27 17:30:24 +00:00
..
scripts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
src Don't hover locked shapes (#3575) 2024-04-27 17:30:24 +00:00
CHANGELOG.md Update CHANGELOG.md [skip ci] 2024-04-23 11:47:53 +00:00
LICENSE.md Change licenses to tldraw (#2167) 2023-12-19 10:41:01 +00:00
README.md updatereadmes 2024-02-29 18:21:17 +00:00
api-extractor.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
api-report.md Readonly / room creation omnibus (#3192) 2024-04-25 14:10:40 +00:00
package.json Update CHANGELOG.md [skip ci] 2024-04-23 11:47:53 +00:00
setupTests.js React-powered SVG exports (#3117) 2024-03-25 14:16:55 +00:00
tsconfig.json New migrations again (#3220) 2024-04-15 12:53:42 +00:00

README.md

tldraw

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.