Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Watch whether the 24px grab band around strokes gets in the way of placing annotations

Aperta
#58 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à
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Leggi MIN_HIT_AREA in lib/editor/render.ts:248 e DRAG_THRESHOLD in lib/editor/tools.ts:58, quindi esamina il relativo flusso di interazione. Esegui l’e2e in annotations.spec.ts, in particolare "a thin line can be selected without hitting it exactly", e verifica se il posizionamento di una didascalia o di uno sticker vicino a un tratto viene intercettato. Il lavoro è completato quando sia il comportamento di selezione previsto sia il posizionamento delle annotazioni create con un clic sono coperti dai test.

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

Descrizione

AI assisted status: triage type: enhancement

MIN_HIT_AREA in lib/editor/render.ts:248 gives every stroked annotation an invisible 24px grab band, so a one pixel line can be selected without hitting that one pixel. It came from #50, where the complaint was the opposite one: selecting a thin line meant zooming in until it was wide enough to click.

Since #53 a click on an existing annotation selects it whatever tool is held, so that band now decides two things rather than one. Placing a caption or a sticker within 24 screen pixels of an existing stroke selects the stroke instead of placing anything. The gesture still draws, because a drag over an annotation draws (DRAG_THRESHOLD, lib/editor/tools.ts:58), but click-created annotations have no drag to fall back on.

Nobody has reported it. This is a note to watch for it, with the numbers written down while they are fresh:

  • 24px is the grab band, in screen pixels at any zoom (hitAreaWidth() divides by the view scale)
  • 4px is what separates a click from a drag
  • the band applies to strokes only, so an unfilled rectangle is still selected by its outline rather than by the space it encloses

If it does bite, the first thing to try is a smaller band, 12 to 16px, which still beats the one or two pixels a hairline had before #50. The e2e in annotations.spec.ts ("a thin line can be selected without hitting it exactly") clicks 8px off the line, so it would have to move with the constant, and that is the test to watch when changing it.

Lingua principale
TypeScript
Stelle
2
Fork
0
Merge medio
1h 15m
PR unite (30g)
31

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 nextcloud-libraries/nextcloud-image-editor

Tutte le issue di nextcloud-libraries/nextcloud-image-editor

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.