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

Aperta
#456 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend, web-dev

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
145
Fork
12
Merge medio
1g 14h
PR unite (30g)
43

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di gravity-ui/graph

Tutte le issue di gravity-ui/graph

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.