Skip to content

Commit

Permalink
fix(editor): TextTool: Increase hit test region size
Browse files Browse the repository at this point in the history
This should make it easier to edit existing text objects.
  • Loading branch information
personalizedrefrigerator committed Dec 31, 2024
1 parent 4394467 commit 97580cd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/js-draw/src/tools/TextTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,7 @@ export default class TextTool extends BaseTool {
if (allPointers.length === 1) {
// Are we clicking on a text node?
const canvasPos = current.canvasPos;
const halfTestRegionSize = Vec2.of(2.5, 2.5).times(
this.editor.viewport.getSizeOfPixelOnCanvas(),
);
const halfTestRegionSize = Vec2.of(4, 4).times(this.editor.viewport.getSizeOfPixelOnCanvas());
const testRegion = Rect2.fromCorners(
canvasPos.minus(halfTestRegionSize),
canvasPos.plus(halfTestRegionSize),
Expand Down

0 comments on commit 97580cd

Please sign in to comment.