Plotly `selected` event infinity loop when using selection 'handles'
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
Problem description:
It seems that when selecting data, having the data or layout change dynamically (using restyle or relayout respectively) and then selecting additional data (by moving the 'handles') the event handler then goes into an infinite loop.
Likely, the relayout due to the reselect causes a reselect which causes a relayout which causes a reselect, etc. etc.
Plotly v2.13+ goes into infinite loop when selecting additional data using the 'handles'.
Notice how the 'handles' do not reappear after moving one at the end of gif (has gone into infinite loop):

Plotly below v2.13 has no issues because it is not possible to reselect data using the 'handles':

Minimum working example: MWE
Taken from the example documentation for select-event
Note that this is a problem for Plotly v2.13+, the original example uses v1.58 (as illustrated on that page) which doesn't seem to have the problem (because the selection 'handles' to select data in the plot are not implemented prior to v2.13)
So this seems to be a regression of some kind.
Steps to reproduce:
- Run provided MWE
- Using lasso select (or other select tool) select some data (first time should not give any problems)
- When using Plotly v2.13+, in the selected data use the 'handles' to select additional data points
- Plotly now enters an infinite loop
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 damit, die bereitgestellte MWE auszuführen und das Verhalten von v2.13+ mit dem Beispiel in der select-event-Dokumentation zu vergleichen. Verfolge den Auswahl-Handle-Fluss, der nach restyle oder relayout ausgelöst wird, und betrachte das Issue als gelöst, wenn das Verschieben eines Handles keine Endlosschleife mehr verursacht und die Handles normal wieder erscheinen.
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