Relayout not provided with event data after mousewheel zoom
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 18.3k
- フォーク
- 2k
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 28
説明
This may well be related to #5698, but that is a few years old and I'm not entirely sure this is the same behaviour, partly because that issue reports two things.
The mousewheel based zoom fires the plotly_relayout event, but after some interactions the event data is empty. When not empty it seems to lag behind what is being displayed.
Tested using the script below. After rotation with a click drag, the zoom with the mouse wheel scroll hits the "No scene data found" found the first time through, suggesting that the scene has not changed despite it changing visually on screen. The subsequent mouse wheel scrolls report the scene data. A single click, being careful not to drag, then reports a different value, suggesting the data provided by relayout on the mouse wheel scroll zoom is lagging behind the new scene position.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Zoom test</title>
<script src="https://cdn.plot.ly/plotly-latest.js" charset="utf-8"></script>
</head>
<body>
<div id="3D_figure"></div>
<script>
var data = [{
type: "mesh3d",
x: [0, 1, 2, 0],
y: [0, 0, 1, 2],
z: [0, 2, 0, 1],
i: [0, 0, 0, 1],
j: [1, 2, 3, 2],
k: [2, 3, 1, 3],
intensity: [0, 0.33, 0.66, 1],
colorscale: [
[0, 'rgb(255, 0, 0)'],
[0.5, 'rgb(0, 255, 0)'],
[1, 'rgb(0, 0, 255)']
]
}];
Plotly.newPlot('3D_figure', data, {});
var top_level_div= document.getElementById('3D_figure');
top_level_div.on('plotly_relayout', (data) => {
if(( typeof data === 'undefined') || !('scene.camera' in data)){
console.log("No scene data found");
}else{
console.log(data['scene.camera'].eye.x);
}
});
</script>
</body>
</html>
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供されたHTML例を再現し、3Dでマウスホイールによるズームを行った際のplotly_relayoutイベントを追跡します。特に、回転およびクリック操作の後を確認します。発行されたscene.cameraデータを、画面に表示されているカメラ位置と比較します。完了の基準は、各ズーム操作後にイベントが更新されたカメラデータを一貫して報告し、空の値や遅延した値を報告しないことです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- data-visualization, frontend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100