feat(설정 마우스): 화면 옮기기 버튼 고르기 — 왼 · 가운데 · 오른 · 지도 · CAD · 종단 · 그림 칸 모두 따름 (PLAN 588-4 · 요구 445 C3)
- ☰ [설정] 마우스 탭 = 휠 방향 + 옮기기 버튼 라디오 · 규칙 글 = 고른 버튼 끌기 옮김(가운데는 늘) - 끌면 옮김 · 덜 끌고 떼면 그 버튼 제 몫(고름 · 메뉴 · CAD Enter) · 오른쪽 끌기 뒤 메뉴 안 뜸 - 왼쪽 옮김은 페이지가 잡은 누름(B05 노드 · 손잡이 · 마커 · 재기 · D03 겹 · 그림 안 도형)에선 비킴 - 자리: B05 · B06 · D03 노선 지도 · CAD · 공용 SVG 확대 · B04 지도 · 3D(오른쪽만) · B05 배수 · 종단 가로 · B08 이정표 · M02 흐름도 · 노임 - 시험: CAD 오른쪽 끌기 옮김 · 옮기기 자리 배선 대조 · 낡은 헬퍼 둘 새 import 대응 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { createButton } from "@ui/ui_template_elements";
|
||||
import { currentLanguageIndex, ui_locales } from "@ui/ui_template_locale";
|
||||
import { wheelZoomsIn } from "../A00_Common/touch_bridge";
|
||||
import { PAN_MOVE_PX, isPanButton, swallowNextMenu } from "../A00_Common/input_prefs";
|
||||
import { createProgressCircle } from "@ui/ui_template_progress";
|
||||
import { createToolbar } from "@ui/ui_template_toolbar";
|
||||
import {
|
||||
@@ -611,8 +612,8 @@ export function createSurfaceMapViewer(): SurfaceMapViewer {
|
||||
// 터치·펜은 팬도 겸하므로 여기서 반환하지 않고 기록만 남긴다 — 그래야 손가락으로도 마커를
|
||||
// 고를 수 있다(끌었으면 이동량 판정에서 걸러진다).
|
||||
if (event.button === 0) clickStart = { x: event.clientX, y: event.clientY };
|
||||
if (event.pointerType === "mouse" && event.button !== 1) {
|
||||
// 마우스 좌버튼은 선택 전용 — 팬을 시작하지 않는다.
|
||||
if (event.pointerType === "mouse" && !isPanButton(event.button)) {
|
||||
// 팬 = ☰ [설정] 옮기기 버튼(가운데는 늘 · 588-4) — 왼쪽이면 끌지 않고 뗀 것은 위 고르기 그대로.
|
||||
return;
|
||||
}
|
||||
dragStart = { x: event.clientX, y: event.clientY, offsetX, offsetY };
|
||||
@@ -651,7 +652,12 @@ export function createSurfaceMapViewer(): SurfaceMapViewer {
|
||||
offsetY = dragStart.offsetY + event.clientY - dragStart.y;
|
||||
scheduleDraw();
|
||||
});
|
||||
const stopDragging = (): void => {
|
||||
const stopDragging = (event?: PointerEvent): void => {
|
||||
// 오른쪽 끌어 옮김 뒤 메뉴 안 뜸(588-4)
|
||||
if (dragStart && event?.button === 2) {
|
||||
const moved = Math.hypot(event.clientX - dragStart.x, event.clientY - dragStart.y);
|
||||
if (moved > PAN_MOVE_PX) swallowNextMenu();
|
||||
}
|
||||
dragStart = null;
|
||||
viewport.style.removeProperty("cursor");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user