Next release
So far this release adds a ThrottledFunction type to @tldraw/utils, thins the hinted shape outline, and fixes bugs in resizing, page duplication, local persistence, the store, and sync.
API changes
- Add a
ThrottledFunction<T>type to@tldraw/utilsfor annotating the result ofthrottle.throttlenow returns this type, with the same runtime behavior. (#10927)
Improvements
- Draw the hinted outline around shapes, such as a frame you're dragging a shape into, at 2px instead of 2.5px. (#10952)
- Speed up
store.query.index()andstore.query.ids()updates by no longer allocating for each change. (#10228)
Bug fixes
- Fix three resize issues: flipping a rotated selection gave its children the wrong rotation, shapes not aligned with the selection received
onResizeStartandonResizeEndmore than once, andresizeBoxslid the fixed edge when a shape hit itsmaxWidthormaxHeight. (#10351) - Fix duplicating a page moving its shapes when they were off screen, and starting the new page with the current page's camera instead of the duplicated page's. (#10465)
- Fix the arrow tool's precise mode carrying over when you move to a different target shape. (#10244)
- Fix holding Cmd/Ctrl+Shift+Arrow switching from selecting a parent or child to selecting the adjacent shape once the key starts repeating. (#10184)
- Fix
editor.setCursorthrowing for the rotate and resize cursor types, and hex cursor colors breaking SVG cursors. (#10350) - Fix edits being lost when an editor remounts with the same
persistenceKeywhile the previous one is still saving. (#10752) - Fix store changes made in the last frame before a listener is removed never reaching that listener. (#10802)
- Fix a reaction that writes to the store re-running on every unrelated store change. (#10236)
- Fix undo restoring an in-between state after a single
putupdated the same record twice. (#10203) - Fix
migrateStoreSnapshotthrowing on a malformed persisted schema instead of returning a migration error. (#10220) - Fix migrations rerunning on records when a persisted schema's sequence version isn't a number. (#10917)
- Fix a resumed sync session on a hibernating host skipping the version checks made on first connect, so after a server redeploy a client could be sent changes its schema couldn't handle. It's now rejected with
SERVER_TOO_OLDorCLIENT_TOO_OLD, as on connect. (#10122) - Fix a record field set to
undefinedgetting the sync session kicked withINVALID_RECORD, and ignore__proto__keys in incoming changes. (#10118) - Fix older sync clients (protocol version 7) silently falling out of sync when the server sent them text-append changes they don't support. (#10095)
Prev
ReleasesNext
v5.5.0