plotly_relayout does not always fire
Nessuno ha ancora preso questa issue.
- Lingua principale
- R
- Stelle
- 2.7k
- Fork
- 641
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I will try and create a reprex if needed however I'm still trying to pin down an exact cause of this, for now I'll include relevant snippets.
In one of my projects I have been using the drawing capabilities of plotly.js:
plotly::plot_ly(.......) %>%
plotly::config(modeBarButtonsToAdd = list("drawclosedpath", "drawrect", "eraseshape")) %>%
plotly::config(displayModeBar = TRUE)
I am listening to the plotly relayout event:
observeEvent(plotly::event_data("plotly_relayout", session = session$rootScope()), {
relayout <- plotly::event_data("plotly_relayout", session = session$rootScope())
dplyr::glimpse(relayout)
#.... rest of the code omitted
})
The issue I am seeing is not all of the drawing events are triggering a shiny event. I have used the websocket viewer of Firefox developer console and the socket contains gaps where the relayout even should be. Hover events are being produced as the mouse is moved for the drawing of the shape however.
I'm seeing series of errors in the browser console:

Specifically for the rectangle draw:

Guida per i contributori
Apri la guida per i contributori
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.
Direzione di ricerca
Inizia con l’observer plotly::event_data("plotly_relayout") e l’output websocket della console per sviluppatori di Firefox, confrontando le azioni di disegno con i messaggi del socket e gli errori del browser segnalati. Il lavoro è completato quando esiste un caso riproducibile che identifica perché gli eventi di disegno di rettangoli o di altro tipo non attivano l’evento Shiny.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, r
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100