3D surface plotly_relayout does not trigger with touch drag. Scroll zoom reports older camera vector.
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 18.3k
- Fork
- 2k
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 28
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với ví dụ biểu đồ bề mặt 3D tại https://plotly.com/javascript/3d-surface-plots/ và tái hiện cả hai hành vi bằng listener plotly_relayout được cung cấp. So sánh các sự kiện kéo bằng cảm ứng và thu phóng bằng thao tác cuộn chuột với di chuyển và xoay, bằng cách kiểm tra _fullLayout.scene.camera của phần tử. Hoàn tất khi thao tác kéo bằng cảm ứng kích hoạt plotly_relayout và thao tác thu phóng bằng cuộn chuột báo cáo vector camera hiện tại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- data-visualization
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100