plotly / plotly/plotly.R

plotly_relayout does not always fire

オープン
#1,909 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
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:
image

Specifically for the rectangle draw:
image

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

plotly::event_data("plotly_relayout") オブザーバーと Firefox 開発者コンソールの websocket 出力から始め、描画操作をソケットメッセージおよび報告されたブラウザーエラーと比較します。矩形などの描画イベントが Shiny イベントのトリガーに失敗する理由を特定できる再現可能なケースが得られれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, r
領域
data-visualization
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。