3D surface plotly_relayout does not trigger with touch drag. Scroll zoom reports older camera vector.
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 18.3k
- フォーク
- 2k
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 28
説明
This is probably similar to https://github.com/plotly/plotly.js/issues/134
The plotly_relayout do trigger with mouse drag correctly.
However, this is not the case for touch drag.
To reproduce the problem please try open
https://plotly.com/javascript/3d-surface-plots/
and execute
document.getElementById("myDiv_1").on('plotly_relayout',()=>{console.log("relayout")});
you can see that the console doesn’t log when using touch emulator.
I also tested with https://cdn.plot.ly/plotly-latest. The problem is still reproducible.

Another problem is mouse scroll zoom. The plotly report older camera vector. After subscribe to plotly_relayout, please then do mouse scroll zoom and execute
Plotly.relayout(document.getElementById("myDiv_1"), document.getElementById("myDiv_1")._fullLayout.scene.camera );
You will notice this the camera position is not always current. This is not problem when pan (right click drag) or rotate view.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
https://plotly.com/javascript/3d-surface-plots/ の 3D サーフェスプロットの例から始め、提供されている plotly_relayout リスナーを使って両方の動作を再現します。要素の _fullLayout.scene.camera を調べながら、タッチドラッグイベントとマウスホイールによるズームを、パンおよび回転と比較します。タッチドラッグによって plotly_relayout が発生し、ホイールによるズームで現在のカメラベクトルが報告されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100