Skip to content

Align idle cursor with grips and toggle Properties with Ctrl/Cmd+1 - #1322

Open
SangIk-Lee wants to merge 1 commit into
storytold:mainfrom
SangIk-Lee:codex/grip-snap-properties-upstream
Open

SangIk-Lee wants to merge 1 commit into
storytold:mainfrom
SangIk-Lee:codex/grip-snap-properties-upstream

Conversation

@SangIk-Lee

Copy link
Copy Markdown

Hovering a selected grip currently changes its colour but leaves the drawn crosshair and cursor coordinates off the grip. Ctrl/Cmd+1 currently opens Properties without closing it, and is ignored while a text field owns keyboard focus.

This aligns the idle cursor with the editable grip under the pointer, using the existing grip hit boxes (nearest ordinary grip when boxes overlap). Acquiring a grip respects GRIPS/GRIPOBJLIMIT and locked layers; selection windows and drawing-point prompts keep their existing coordinate handling. Dynamic grips retain their existing hit priority.

A registered ui.toggle.properties command drives the Window menu and Ctrl/Cmd+1. The shortcut works with text focus, preserves the active command, and restores a closed panel's docking/floating position. ui.panel.properties and the typed PROPERTIES command remain explicit opens.

Scope and related work

Based directly on upstream main at fc4e98315a8d771b5ab832f0ade0b5e7b106df7f; this contains no selected-entity API, PICKDRAG or click/drag classification changes from my other branches.

I checked the open PR list and related open/closed searches before preparing this change. I found no direct implementation of these two behaviours. Related work:

Validation

Four of the six new integration tests fail against unmodified upstream main: grip acquisition, repeated Properties toggling, the focused-text shortcut, and floating-panel toggling.

The tests cover polyline vertices/midpoints at 100%/200% scale, clicking an acquired grip, leaving the hit box, hidden grips, selection-window and LINE input preservation, unchanged drawing contents, repeated Ctrl+1, focused text, active commands, and floating-panel restoration.

  • All six new integration tests pass with the fix; their headless rendered grip/crosshair alignment was inspected.
  • cargo xtask ci: all six stages pass (fmt, Clippy with warnings denied, tests, assets, layers, WASM). 2,015 tests passed, 0 failed, 0 ignored. The WASM check retains three existing dead-code warnings in canvas/rebuild.rs.

No live desktop mouse/keyboard acceptance or cross-platform OS shortcut delivery is claimed.

## 변경 내용
- 선택한 편집 가능 그립의 기존 클릭 범위에서 커서와 좌표를 정확한 그립 위치로 정렬
- 영역 선택과 실행 중인 도면 명령은 기존 좌표 입력 방식을 유지
- ui.toggle.properties 명령을 등록하고 메뉴와 Ctrl/Cmd+1에 연결
- 입력칸 포커스 상태에서도 특성창 토글을 처리하며 명시적 열기 명령과 도킹 위치 복원을 유지
- UI 현황 문서와 통합 회귀 테스트 6개 추가

## 범위와 검증
- upstream fc4e983에서 이번 두 기능만 분리; 선택 객체 조회 API와 기존 선택 입력 수정은 제외
- 수정 전 upstream에서 새 테스트 4개가 실패함을 확인하고 수정 후 6개 모두 통과
- 100%/200% 배율, 꼭짓점·중점, 그립 클릭, 영역 선택·LINE 입력, 숨긴 그립, 텍스트 포커스, 분리 창 위치 검증
- 헤드리스 화면으로 그립과 십자 커서의 정렬을 확인; 실제 데스크톱 사용감 검증은 포함하지 않음
- cargo xtask ci 6단계 통과: 테스트 2,015개 성공, 실패·무시 0개; WASM 기존 경고 3개 유지

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant