10.2.1

konvajs/konva10.2.1Mar 13, 2026by github-actions[bot]

AI Summary

Fixes TextPath truncation issues and improves drag event handling, including a new TypeScript overload for event delegation.

Key Highlights

  • Fixed TextPath last character truncation when path length equals text width
  • Improved TextPath kerning measurement using dynamic threshold
  • Fixed drag button value in dragstart event by storing start event
  • Added TypeScript overload for Node.on event delegation pattern

New Features

  • TypeScript overload for Node.on event delegation pattern

Full Release Notes

## Bug Fixes
- prevent last char truncation in TextPath when path length equals text width [#2032](https://github.com/konvajs/konva/pull/2032) ([copilot-swe-agent[bot]](https://github.com/konvajs/konva/commit/b2f58e710052dd405f893a5930acf7b2ae109ade))
- **TextPath**: use kerning measurement diff as dynamic threshold instead of static epsilon [#2032](https://github.com/konvajs/konva/pull/2032) ([copilot-swe-agent[bot]](https://github.com/konvajs/konva/commit/517d6517c04592dc54d02316602138909efcf17d))

## Code Refactoring
- extract GLYPH_PATH_PRECISION constant for the epsilon threshold [#2032](https://github.com/konvajs/konva/pull/2032) ([copilot-swe-agent[bot]](https://github.com/konvajs/konva/commit/ad3ebd61caad96ca556aa29e59ba02cd8e94b70e))

## Tests
- **TextPath**: add ±1px tolerance to width assertion in 'check bad calculations 2' [#2032](https://github.com/konvajs/konva/pull/2032) ([copilot-swe-agent[bot]](https://github.com/konvajs/konva/commit/53308b88c0d80b78bf3d6c1bcbe6de588d2290b3))

## Commits
- 4e86b83: Initial plan (copilot-swe-agent[bot]) [#2027](https://github.com/konvajs/konva/pull/2027)
- 752d4e1: Add failing test for drag button value in dragstart event (copilot-swe-agent[bot]) [#2027](https://github.com/konvajs/konva/pull/2027)
- 61128a6: Fix drag button always being 0 by storing start event (copilot-swe-agent[bot]) [#2027](https://github.com/konvajs/konva/pull/2027)
- 6830409: Add comment explaining fallback logic in startDrag (copilot-swe-agent[bot]) [#2027](https://github.com/konvajs/konva/pull/2027)
- 0863c42: Initial plan (copilot-swe-agent[bot]) [#2028](https://github.com/konvajs/konva/pull/2028)
- a43dcdf: Add TypeScript overload for Node.on event delegation pattern (copilot-swe-agent[bot]) [#2028](https://github.com/konvajs/konva/pull/2028)
- c3d7a40: Address code review comments: remove redundant variable and extra blank line (copilot-swe-agent[bot]) [#2028](https://github.com/konvajs/konva/pull/2028)
- 4a5eb5c: Initial plan (copilot-swe-agent[bot]) [#2032](https://github.com/konvajs/konva/pull/2032)
- 1fc6511: fix possible crash (Anton Lavrevov)
- 5364959: Merge branch 'master' of github.com:konvajs/konva (Anton Lavrevov)
- 13c015f: update CHANGELOG with new version (Anton Lavrevov)
- bd4e3e8: build for 10.2.1 (Anton Lavrevov)
- 640a1b2: update cdn link (Anton Lavrevov)