tldraw/packages/editor
Steve Ruiz 2a7b2dcdfd
[improvement] set horizontal position using text alignment (#1419)
This PR makes it so that horizontal alignment in geo and sticky note
shapes also effects the position of the text within the shape.

<img width="1169" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/96b28a7d-0f13-46ba-9ea1-82d02b4f870b">

<img width="1274" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/fa768c71-4e9e-4cfe-ad8a-94d7700c445d">

This PR also places the shape's label at the center when there is no
text and the shape is not editing.

### Change Type

- [x] `minor` — New Feature

### Test Plan

1. Create shapes with labels
2. Confirm that their labels are positioned correctly
3. Export the shapes and verify the export

### Release Notes

- Geo shapes and sticky notes now position their labels based on their
alignment.
2023-05-19 11:19:11 +00:00
..
src [improvement] set horizontal position using text alignment (#1419) 2023-05-19 11:19:11 +00:00
api-extractor.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
api-report.md [firefox] Fix the pointer getting stuck down when you press the control key (#1390) 2023-05-19 10:35:24 +00:00
CHANGELOG.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
editor.css [improvement] set horizontal position using text alignment (#1419) 2023-05-19 11:19:11 +00:00
LICENSE transfer-out: transfer out 2023-04-25 12:01:25 +01:00
package.json avoid lazy race conditions (#1364) 2023-05-12 15:41:40 +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 transfer-out: transfer out 2023-04-25 12:01:25 +01:00

tldraw/tldraw

Benchmark

To run the benchmarks

yarn workspace @tldraw/tldraw benchmark

Or

yarn workspace @tldraw/tldraw benchmark "file_search_string"