d3.stop() should return the time it was stopped at
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- frontend
Direzione di ricerca
The issue shows a d3.timer example and proposes using the value returned by timer.stop() as the elapsed time passed to timer.restart(). Start by reading the timer API implementation and its tests to see how stopping and restarting currently handle elapsed time. Done means the API behavior supports pausing and resuming an animation as described, with tests covering the returned value and restart behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I was looking into how I can gracefully resume a timer that might have been stopped and thought this would have been a natural choice, but noticed the function didn't return anything. This is helpful for pausing and resuming mid-way through an animation. If I restarted the timer, it will likely interrupt the timer and restart the animation.
const hello = (elapsedTime) => console.log("hello world", elapsedTime)
const timer = d3.timer(hello)
setTImeout(() => {
const stoppedTime = timer.stop()
setTImeout(() => {
timer.restart(hello, null, stoppedTime)
}, 5000)
}, 5000)
Is there a way to achieve something similar?
- Lingua principale
- JavaScript
- Stelle
- 168
- Fork
- 43
- Merge medio
- 2h 14m
- PR unite (30g)
- 2
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 d3/d3-timer
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
0. Needs triage bug feature: api
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
agent-os ai bug good first issue help wanted
Difficoltà 1/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
area: documentation good first issue package: rule-data status: accepting prs
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
mastra-ai/mastra#30109 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno