feat(CAD): 332-3 설정 배선 — 휠 확대 방향 · 내 별칭
- 휠 — A00_Common/input_prefs 방향(기본 당김 = 지금과 같음 · 밀기 저장 뒤 뒤집힘) · 트랙패드 핀치는 늘 벌리면 확대(옛 CAD 는 벌리면 축소) - 별칭 — 명령 이름 > 내 별칭(cadAliases) > 기본 별칭 · 자동완성 후보 맨 앞 · 부를 때마다 읽어 저장 즉시 따름 - tsconfig include 에 input_prefs.ts · 시험 resources/tester/cad/input-prefs-cad.test.ts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QyNXY2TUKXCFMwAca2APG
This commit is contained in:
@@ -22,8 +22,8 @@ describe('CAD 휠 = 늘 줌(153-3)', () => {
|
||||
expect(wheel(-1, 2)).toEqual({ delta: WHEEL_PAGE_PX, exponent: WHEEL_ZOOM_EXPONENT });
|
||||
});
|
||||
|
||||
it('ctrl+휠(핀치)은 핀치 지수', () => {
|
||||
expect(wheel(-7, 0, true)).toEqual({ delta: 7, exponent: PINCH_ZOOM_EXPONENT });
|
||||
it('ctrl+휠(핀치)은 핀치 지수 · 벌리면(deltaY < 0) 확대(332)', () => {
|
||||
expect(wheel(-7, 0, true)).toEqual({ delta: -7, exponent: PINCH_ZOOM_EXPONENT });
|
||||
});
|
||||
|
||||
it('델타 0 은 안 움직임', () => {
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
WHEEL_PAGE_PX,
|
||||
WHEEL_ZOOM_EXPONENT,
|
||||
} from '../App.consts.ts';
|
||||
import { wheelEventIn } from '../../../../A00_Common/input_prefs';
|
||||
|
||||
/**
|
||||
* 휠 한 번 → 화면 확대(`zoomScreen` 인자). 휠은 늘 줌 · 커서 자리 고정(153-3) — 마우스 · 트랙패드를
|
||||
@@ -17,8 +18,12 @@ export function wheelZoom(
|
||||
const unitPx = evt.deltaMode === 1 ? WHEEL_LINE_PX : evt.deltaMode === 2 ? WHEEL_PAGE_PX : 1;
|
||||
const deltaY = evt.deltaY * unitPx;
|
||||
if (deltaY === 0) return null;
|
||||
// Aislo: wheel direction is inverted on purpose - pulling the wheel zooms in, pushing
|
||||
// zooms out, matching the B04/B05 maps and the B06 cross sections (2026-08-02).
|
||||
// 방향 = ☰ [설정] 휠 확대 방향(기본 당김 = 몸 쪽으로 굴리면 확대 · 모든 화면 일체) ·
|
||||
// 트랙패드 핀치는 늘 벌리면 확대. zoomScreen 은 음수 = 확대.
|
||||
// 핀치(ctrl+휠)는 델타가 잘아 지수만 크게.
|
||||
return { delta: -deltaY, exponent: evt.ctrlKey ? PINCH_ZOOM_EXPONENT : WHEEL_ZOOM_EXPONENT };
|
||||
const size = Math.abs(deltaY);
|
||||
return {
|
||||
delta: wheelEventIn({ ctrlKey: evt.ctrlKey, deltaY }) ? -size : size,
|
||||
exponent: evt.ctrlKey ? PINCH_ZOOM_EXPONENT : WHEEL_ZOOM_EXPONENT,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user