f7b325c48c
Fixes an issue with creating arrows. Currently we create an arrow that has both `start` and `end` handles set to the same point. This causes `NaN` issues in some of our functions / svg rendering. After this change we only create the arrow after we start dragging, which ensures the start and the end handle won't have the same coordinates. This probably feels the best way to approach it: arrow of length 0 doesn't really make sense. Resolves [#2005](https://github.com/tldraw/tldraw/issues/2005) Before https://github.com/tldraw/tldraw/assets/2523721/6e83c17e-21bd-4e0a-826b-02fad9c21ec6 After https://github.com/tldraw/tldraw/assets/2523721/29359936-b673-4583-89c8-6d1728ab338c ### Change Type - [x] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [ ] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### Test Plan 1. Create an arrow. 2. You should not see any errors in the console. --------- Co-authored-by: Steve Ruiz <steveruizok@gmail.com> |
||
---|---|---|
.. | ||
assets | ||
editor | ||
state | ||
store | ||
tldraw | ||
tlschema | ||
utils | ||
validate |