From b4a653e68259042cf2529e0ac13a9b492ac4fcd5 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 30 Aug 2026 21:23:24 +0900 Subject: [PATCH] =?UTF-8?q?fix(B07):=20=EC=9A=B0=ED=81=B4=EB=A6=AD=20?= =?UTF-8?q?=EB=92=A4=EC=97=90=EB=8F=84=20=EC=84=A0=ED=83=9D=20=EB=8F=84?= =?UTF-8?q?=EA=B5=AC=EA=B0=80=20=EC=82=B4=EC=95=84=20=EC=9E=88=EA=B2=8C=20?= =?UTF-8?q?=ED=95=98=EA=B3=A0,=20=EC=BB=A4=EC=84=9C=20=EC=98=86=20?= =?UTF-8?q?=EA=B8=80=EC=9E=90=EB=A5=BC=20=EC=A4=84=EC=9D=B8=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 선택 아이콘을 누르고 우클릭하면 커서 옆 안내가 사라졌다. 우클릭은 ENTER이고, 선택 도구는 ENTER로 최종 상태(SELECTION_COMPLETED, type: final)에 들어가 멈춘다. 그 끝남은 move·copy·rotate가 선택을 자식으로 불러 쓸 때 onDone으로 필요하므로 두고, 선택이 그 자체로 활성 도구일 때만 새로 세운다. 커서를 따라다니는 글자가 18px이라 컸다. 쓰이지 않던 상수 CANVAS_INPUT_FIELD_FONT_SIZE를 12로 낮춰 두 곳이 함께 쓰게 했다. Co-Authored-By: Claude Opus 5 (1M context) --- B07_DesignDetail/openwebcad/src/App.consts.ts | 2 +- .../src/inputController/input-controller.ts | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/B07_DesignDetail/openwebcad/src/App.consts.ts b/B07_DesignDetail/openwebcad/src/App.consts.ts index 1afeab60..22242cec 100644 --- a/B07_DesignDetail/openwebcad/src/App.consts.ts +++ b/B07_DesignDetail/openwebcad/src/App.consts.ts @@ -197,7 +197,7 @@ export const CANVAS_INPUT_FIELD_SELECTION_TEXT_COLOR = '#000'; /** * Canvas input field text size in pixels */ -export const CANVAS_INPUT_FIELD_FONT_SIZE = 16; +export const CANVAS_INPUT_FIELD_FONT_SIZE = 12; /** * Canvas input field instruction text color diff --git a/B07_DesignDetail/openwebcad/src/inputController/input-controller.ts b/B07_DesignDetail/openwebcad/src/inputController/input-controller.ts index 6e5c0683..2ec21f69 100644 --- a/B07_DesignDetail/openwebcad/src/inputController/input-controller.ts +++ b/B07_DesignDetail/openwebcad/src/inputController/input-controller.ts @@ -1,7 +1,9 @@ import { Point } from '@flatten-js/core'; import { compact, round } from 'es-toolkit'; +import { Actor } from 'xstate'; import { CANVAS_INPUT_FIELD_BACKGROUND_COLOR, + CANVAS_INPUT_FIELD_FONT_SIZE, CANVAS_INPUT_FIELD_HEIGHT, CANVAS_INPUT_FIELD_INSTRUCTION_TEXT_COLOR, CANVAS_INPUT_FIELD_MOUSE_OFFSET, @@ -39,6 +41,7 @@ import { getSnapPoint, getSnapPointOnAngleGuide, redo, + setActiveToolActor, setAngleStep, setGhostHelperEntities, setGridEnabled, @@ -50,7 +53,7 @@ import { undo, } from '../state.ts'; import { Tool } from '../tools.ts'; -import { SelectState } from '../tools/select-tool.ts'; +import { SelectState, selectToolStateMachine } from '../tools/select-tool.ts'; import { type AbsolutePointInputEvent, ActorEvent, @@ -139,7 +142,7 @@ export class InputController { { textAlign: 'left', textColor: CANVAS_INPUT_FIELD_TEXT_COLOR, - fontSize: 18, + fontSize: CANVAS_INPUT_FIELD_FONT_SIZE, } ); } @@ -496,10 +499,18 @@ export class InputController { text: this.text, activeTool: getActiveToolActor(), }); + const wasSelectTool = this.isSelectToolActive(); // Send the ENTER event to the active tool getActiveToolActor()?.send({ type: ActorEvent.ENTER, }); + // 선택 도구는 ENTER(우클릭)로 최종 상태에 들어가 **멈춘다**. 다른 도구가 선택을 + // 자식으로 불러 쓸 때는 그 끝남이 필요하지만(move·copy·rotate의 onDone), + // 선택이 그 자체로 활성 도구일 때 멈추면 커서 옆 안내가 사라지고 이후 클릭도 + // 안 먹는다(2026-08-30 사용자 지적). 그 경우에만 새로 세워 준다. + if (wasSelectTool && getActiveToolActor()?.getSnapshot()?.status === 'done') { + setActiveToolActor(new Actor(selectToolStateMachine)); + } } else if (activeToolCanHandleTextInput) { console.log('TEXT_INPUT: ', { text: this.text, @@ -643,7 +654,7 @@ export class InputController { { textAlign: 'left', textColor: CANVAS_INPUT_FIELD_INSTRUCTION_TEXT_COLOR, - fontSize: 18, + fontSize: CANVAS_INPUT_FIELD_FONT_SIZE, } ); });