[2e] Replace hardcoded _setup(893, 1117) with ARFset constructor options
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- javascript
Direzione di ricerca
Inizia da src/ARFset.js:249-251 leggendo il costruttore di ARFset e la relativa chiamata a _setup. Aggiungi opzioni width e height opzionali, mantenendo i valori predefiniti 893 × 1117, quindi esamina example/example.html e example_es6.html per assicurarti che il loro utilizzo del costruttore rifletta il comportamento previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Replace hardcoded _setup(893, 1117) magic numbers with configurable ARFset constructor options
Environment
- Product/Service: FeatureSET-Display — JavaScript API
- File:
src/ARFset.js:249-251
Problem Description
The ARFset constructor calls _setup(893, 1117) with hardcoded canvas dimensions. These magic numbers are undocumented, cannot be overridden by callers, and do not reflect real use-case canvas sizes. Any application needing a different canvas size must patch the source.
Expected Behavior
The ARFset constructor accepts an optional { width, height } options object with sensible defaults (e.g. { width: 893, height: 1117 } to maintain existing behavior). Callers can override dimensions without modifying the library.
Actual Behavior
Canvas dimensions are hardcoded in the constructor; no way for callers to specify a different size.
Tasks
- Accept
{ width, height }in theARFsetconstructor with defaults matching current hardcoded values - Pass the options through to
_setup(width, height) - Update example HTML files (
example/example.html,example_es6.html) to explicitly pass dimensions or rely on defaults
Impact
Low — Usability improvement; no functional regression. Current defaults preserve existing behavior.
Additional Context
This is a non-breaking change if defaults match current hardcoded values (893 × 1117). Consider also accepting a single canvas element reference as an alternative constructor signature to read dimensions from the DOM element directly.
- Lingua principale
- JavaScript
- Stelle
- 8
- Fork
- 2
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di webarkit/FeatureSET-Display
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
Tutte le issue di webarkit/FeatureSET-Display
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mksglu/context-mode#1200 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
neondatabase/website#5944 ·
-
module: core
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
bigbluebutton/bigbluebutton#25849 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jaegertracing/jaeger-ui#4506 ·