tldraw/packages/editor
Mitja Bezenšek d738c28c19
Add support for locking shapes (#1447)
Add support for locking shapes. 

How it works right now:
- You can lock / unlock shapes from the context menu.
- You can also lock shapes with `⇧⌘L` keyboard shortcut.
- You cannot select locked shapes: clicking on the shape, double click
to edit, select all, brush select,... should not work.
- You cannot change props of locked shapes.
- You cannot delete locked shapes.
- If a shape is grouped or within the frame the same rules apply.
- If you delete a group, that contains locked shape it will also delete
those shapes. This seems to be what other apps use as well.

Solves #1445 

### Change Type

- [x] `minor` — New Feature

### Test Plan

1. Insert a shape
2. Right click on it and lock it.
3. Test that you cannot select it, change its properties, delete it.
4. Do the same with locked groups.
5. Do the same with locked frames.

- [x] Unit Tests
- [ ] Webdriver tests

### Release Notes

- Add support for locking shapes.

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2023-06-01 18:13:38 +00:00
..
src Add support for locking shapes (#1447) 2023-06-01 18:13:38 +00:00
api-extractor.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
api-report.md Add support for locking shapes (#1447) 2023-06-01 18:13:38 +00:00
CHANGELOG.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
editor.css [3/3] Highlighter styling (#1490) 2023-06-01 15:34:59 +00:00
LICENSE transfer-out: transfer out 2023-04-25 12:01:25 +01:00
package.json [refactor] User-facing APIs (#1478) 2023-06-01 15:47:34 +00:00
README.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
setupTests.js derived presence state (#1204) 2023-04-27 18:03:19 +00:00
tsconfig.json [chore] remove benchmark (#1489) 2023-05-30 15:43:28 +00:00

tldraw/tldraw

Benchmark

To run the benchmarks

yarn workspace @tldraw/tldraw benchmark

Or

yarn workspace @tldraw/tldraw benchmark "file_search_string"