fix(B07): CAD 작은 흠 셋 — 원 도구 Esc 취소 · TEXT 대소문자 보존 · 드롭다운 Space 키 값(99-5)

This commit is contained in:
2026-10-08 15:22:21 +09:00
parent a014c7c1f3
commit 4cb02651a2
4 changed files with 14 additions and 4 deletions
@@ -6,6 +6,7 @@ import {
getActiveLineColor,
getActiveLineDash,
getActiveLineWidth,
setActiveToolActor,
setAngleGuideOriginPoint,
setGhostHelperEntities,
setSelectedEntityIds,
@@ -13,9 +14,10 @@ import {
} from '../state';
import type { DrawEvent, PointInputEvent, StateEvent, ToolContext } from './tool.types';
import { Tool } from '../tools';
import { assign, createMachine } from 'xstate';
import { Actor, assign, createMachine } from 'xstate';
import { pointDistance } from '../helpers/distance-between-points';
import { LineState } from './line-tool.ts';
import { selectToolStateMachine } from './select-tool.ts';
import { getPointFromEvent } from '../helpers/get-point-from-event.ts';
export interface CircleContext extends ToolContext {
@@ -33,6 +35,7 @@ export enum CircleAction {
RECORD_START_POINT = 'RECORD_START_POINT',
DRAW_TEMP_CIRCLE = 'DRAW_TEMP_CIRCLE',
DRAW_FINAL_CIRCLE = 'DRAW_FINAL_CIRCLE',
SWITCH_TO_SELECT_TOOL = 'SWITCH_TO_SELECT_TOOL',
}
export const circleToolStateMachine = createMachine(
@@ -68,6 +71,9 @@ export const circleToolStateMachine = createMachine(
actions: CircleAction.RECORD_START_POINT,
target: CircleState.WAITING_FOR_POINT_ON_CIRCLE,
},
ESC: {
actions: CircleAction.SWITCH_TO_SELECT_TOOL,
},
},
},
[CircleState.WAITING_FOR_POINT_ON_CIRCLE]: {
@@ -159,6 +165,9 @@ export const circleToolStateMachine = createMachine(
centerPoint: null,
};
}),
[CircleAction.SWITCH_TO_SELECT_TOOL]: () => {
setActiveToolActor(new Actor(selectToolStateMachine));
},
},
}
);