plotly / plotly/plotly.R

Mapbox "fitBounds" handling

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

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

主要言語
R
スター
2.7k
フォーク
641
PR マージ指標
30日以内にマージされた PR はありません

説明

As per https://github.com/plotly/plotly.R/blob/9ee548023bba6d68dd953f46485b2e611026766b/inst/htmlwidgets/plotly.js#L206-L220

I believe the if(!args) check should be changed (or the parameter for args should default to null or some other calculated default, not {}) as it currently causes an "e is undefined" error in mapbox (where e is the 2nd parameter).

I've got around it by explicitly providing a mapbox = list(_fitBounds = list(c(xmin, ymin), c(xmax, ymax)), options = list()) entry in my plotly::layout call.

This also serves as a reminder that the fitBounds doesn't seem to work for restyle either.

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

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

はじめの一歩

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

調査の方向性

inst/htmlwidgets/plotly.js の 206–220 行目から始め、fitBounds 引数のデフォルト値と、2 番目のパラメーターが undefined になるエラーを発生させる Mapbox 呼び出しに注目してください。mapbox オプションの明示的なリストがある場合とない場合で問題を再現し、その後、restyle 中でも fitBounds が機能することを確認してください。

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

評価

技術スタック
javascript, r
領域
data-visualization, frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

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

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