plotly / plotly/plotly.js

Plotly.relayout call stops the _fullLayout of the DOM object to track subsequent layout changes triggered by mouse interaction

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

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

bug P2
主要言語
JavaScript
スター
18.3k
フォーク
2k
平均マージ
2日 12時間
マージ済み PR(30日)
28

説明

Hi,

I had been doing some tests with layout persistence using uirevision and noticed that a manual call to Plotly.Plots.resize or Plotly.relayout after a plot object has been created stops _fullLayout.scene.camera.eye of the DOM object associated to the plot to track the actual value of scene.camera.eye shown in the Plot.

This causes subsequent calls to Plotly.react with the same uirevision to reset the view. This problem does not exist if no manual relayout is done, but I needed resize (and thus relayout) for my use case to adapt the plot size after creation.

Here is a gif example:
9b5587a0-2caa-4334-b17f-2f999ebcc46e

and the related codepen link:
https://codepen.io/disberd/pen/xxpgEVq

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

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

はじめの一歩

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

調査の方向性

まず、リンクされた CodePen を使い、Plotly.Plots.resize または Plotly.relayout の後にマウス操作を行い、同じ uirevision を指定した Plotly.react を呼び出して、カメラの永続化に関する失敗を再現します。_fullLayout.scene.camera.eye がどのように更新されるかを追跡し、手動呼び出しの有無で動作を比較します。リサイズまたは relayout の後の後続の Plotly.react 呼び出しで、操作後のカメラビューが維持されれば完了です。

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

評価

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

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

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