[Fractal-gh] Add drag-box zoom, mouse-wheel zoom and shareable coordinates in the URL

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

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Read Mandlebrot/Fractal-gh/app/app.js around lines 153–172 and Mandlebrot/Fractal-gh/app/fractal.js around zoomInPxBox (lines 32 and 126–128). Start by tracing the existing click zoom and update flow. Implement drag selection, cursor centered wheel zoom, and hash state loading and saving; verify each acceptance criterion, including restoring the view from a copied URL.

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

Descrizione

area: mandelbrot good first issue priority: P3 size: S type: enhancement

Summary

fractal.js already supports zoomInPxBox, but app.js never uses it; zoom is fixed at 5x per click and there is no way to share or bookmark a location.

Location

  • Mandlebrot/Fractal-gh/app/fractal.js:32,126-128 (zoomInPxBox implemented)
  • Mandlebrot/Fractal-gh/app/app.js:153-172 (only click / alt-click / shift-click handled)

Evidence

grep -n zoomInPxBox Mandlebrot/Fractal-gh/app/app.js returns nothing.

Expected

Users can drag a rectangle to zoom, use the wheel for fine zoom, and copy a URL that reopens the same view.

Proposed fix

  1. Mouse down/move/up draws a selection rectangle; on release call update({zoomInPxBox}).
  2. wheel event: zoom by 1.25x around the cursor.
  3. Store cords and maxEscapeTime in location.hash; read them on load.

Acceptance criteria

  • Drag-zoom selects exactly the dragged region (aspect corrected)
  • Wheel zoom keeps the point under the cursor fixed
  • Reloading a copied URL restores the view

Repository audit, November 2026 · Phase 9 · New features · evidence: reproduced · ref fractals-equations-009


Generated by Claude Code

Lingua principale
C++
Stelle
2
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 ibra-kdbra/Math-Problems

Tutte le issue di ibra-kdbra/Math-Problems

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.