plotly_relayout does not always fire
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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:

コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
plotly::event_data("plotly_relayout") オブザーバーと Firefox 開発者コンソールの websocket 出力から始め、描画操作をソケットメッセージおよび報告されたブラウザーエラーと比較します。矩形などの描画イベントが Shiny イベントのトリガーに失敗する理由を特定できる再現可能なケースが得られれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100