Skip to content

fix(canvas): update text transformer selection handles on font family change - #34

Open
phanex wants to merge 1 commit into
tomLadder:mainfrom
phanex:fix/text-transformer-handles
Open

fix(canvas): update text transformer selection handles on font family change#34
phanex wants to merge 1 commit into
tomLadder:mainfrom
phanex:fix/text-transformer-handles

Conversation

@phanex

@phanex phanex commented Aug 29, 2026

Copy link
Copy Markdown

Summary

Currently, TextElement renders <ElementWrapper nodeRef={ref} isSelected={isSelected} /> without passing font properties in deps. When changing fontFamily in the inspector, the canvas text re-renders with new font metrics, but Konva's Transformer selection box remains frozen at the old font bounds until manually resized by dragging handles.

Fix

Pass font dependencies (deps={[p.fontFamily, p.fontSize, p.letterSpacing, p.text, fontStyle, element.height]}) to <ElementWrapper> so Konva's Transformer recalculates selection handles instantly on font family changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant