diff --git a/B07_DesignDetail/openwebcad/src/App.css b/B07_DesignDetail/openwebcad/src/App.css index 704bf11e2..ba1b7de29 100644 --- a/B07_DesignDetail/openwebcad/src/App.css +++ b/B07_DesignDetail/openwebcad/src/App.css @@ -1100,33 +1100,3 @@ body.cad-file-dragging::after { color: var(--cad-text); font-size: 11px; } - -/* 손가락 기기 명령 단추(기기대응 4-1 · `input-touch.ts`) — 자판 없이 Esc · Enter · 지움 · 되돌리기 · 다시 · 스냅. - 마우스만 있는 화면엔 안 보임. 그림 면 오른쪽 가운데에 세로로. */ -.cad-touch-bar { - display: none; -} - -@media (any-pointer: coarse) { - .cad-touch-bar { - position: fixed; - top: 50%; - right: 8px; - z-index: 50; - display: flex; - flex-direction: column; - gap: 6px; - transform: translateY(-50%); - } - - .cad-touch-bar > button { - width: 44px; - height: 44px; - border: 1px solid var(--color-border); - border-radius: 8px; - background: var(--color-surface-raised); - color: var(--color-text); - font-size: 18px; - box-shadow: var(--shadow-sm); - } -} diff --git a/B07_DesignDetail/openwebcad/src/inputController/input-touch.css b/B07_DesignDetail/openwebcad/src/inputController/input-touch.css new file mode 100644 index 000000000..398902eac --- /dev/null +++ b/B07_DesignDetail/openwebcad/src/inputController/input-touch.css @@ -0,0 +1,29 @@ +/* 손가락 기기 명령 단추(기기대응 4-1 · `input-touch.ts`) — 자판 없이 Esc · Enter · 지움 · 되돌리기 · 다시 · 스냅. + 마우스만 있는 화면엔 안 보임. 그림 면 오른쪽 가운데에 세로로. */ +.cad-touch-bar { + display: none; +} + +@media (any-pointer: coarse) { + .cad-touch-bar { + position: fixed; + top: 50%; + right: 8px; + z-index: 50; + display: flex; + flex-direction: column; + gap: 6px; + transform: translateY(-50%); + } + + .cad-touch-bar > button { + width: 44px; + height: 44px; + border: 1px solid var(--color-border); + border-radius: 8px; + background: var(--color-surface-raised); + color: var(--color-text); + font-size: 18px; + box-shadow: var(--shadow-sm); + } +} diff --git a/B07_DesignDetail/openwebcad/src/inputController/input-touch.ts b/B07_DesignDetail/openwebcad/src/inputController/input-touch.ts index aa1d2283c..432cf5b54 100644 --- a/B07_DesignDetail/openwebcad/src/inputController/input-touch.ts +++ b/B07_DesignDetail/openwebcad/src/inputController/input-touch.ts @@ -2,6 +2,7 @@ import { Point } from '@flatten-js/core'; import { setTouchPickPx } from '../helpers/pick-radius.ts'; import { getCanvas, getScreenCanvasDrawController } from '../state.ts'; import type { InputController } from './input-controller.ts'; +import './input-touch.css'; /** * 손가락 CAD(기기대응 4-1) — 마우스 코드는 그대로 두고 손가락만 여기서 번역한다.