GraphLayer: refresh the hover target when components change under a stationary pointer

Đang mở
#456 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend, web-dev

Hướng nghiên cứu

Start with src/components/canvas/layers/graphLayer/GraphLayer.ts around lines 215–261 and compare the v2 implementation around lines 201–231. Trace how pointer input, the 3 px movement threshold, camera changes, and pointer capture update the hover target; then identify how a layer could request a re-hit-test after its components change. Done means the stationary pointer gets the normal enter/leave transition, while active pointer capture is respected.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Reproduction

  1. Hover an interactive canvas component with a custom cursor.
  2. Keep the pointer still and use a keyboard modifier to replace that component with another interactive component at the same position. For example, swap a resize handle for an insertion handle while Shift is held.
  3. Let the graph render and its hit-test index settle. The hover target and cursor can still describe the previous component. Moving the mouse far enough refreshes them.

Expected behavior

Provide a supported way to recompute the hover target at the last pointer position once the hit-test scene has changed. It should dispatch the normal enter/leave transition when the target changes and respect an active pointer capture. An explicit invalidation API would let a custom layer request this only when its interactive components change.

GraphLayer currently updates the target on pointer input, skips mouse moves below the 3 px threshold, and can optionally re-hit-test on camera changes. A layer can change its components without any of those events. See main and v2.

Ngôn ngữ chính
TypeScript
Star
145
Fork
12
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
43

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của gravity-ui/graph

Tất cả issue của gravity-ui/graph

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.