3D surface plotly_relayout does not trigger with touch drag. Scroll zoom reports older camera vector.
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.3k
- Forks
- 2k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 28
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem Beispiel für 3D-Oberflächenplots unter https://plotly.com/javascript/3d-surface-plots/ und reproduziere beide Verhaltensweisen mithilfe des bereitgestellten plotly_relayout-Listeners. Vergleiche Touch-Drag-Ereignisse und Mouse-Scroll-Zoom mit Schwenken und Rotieren, indem du _fullLayout.scene.camera des Elements untersuchst. Als abgeschlossen gilt die Aufgabe, wenn Touch-Drag plotly_relayout auslöst und Scroll-Zoom den aktuellen Kameravektor meldet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100