Flame chart - jumpTo called before scroll position offsets have new size
- Vorherrschende Sprache
- Dart
- Sterne
- 1.7k
- Forks
- 404
- Ø Merge
- 6 T. 17 Std.
- Gemergte PRs (30 T.)
- 18
Beschreibung
In flame_chart.dart, we call
```
linkedHorizontalScrollControllerGroup.jumpTo(newScrollOffset);
```
to update the scroll offset as we zoom. We call this inside of an animation controller listener `zoomController.addListener(() { ... })`. At times when we call this, `scrollController.position.maxScrollOffset` is not updated for the new zoom level and layout size, causing `jumpTo` to fire BallisticScrollActivities to bounce the scroll offset back to what it thinks is the `maxScrollOffset`.
We need to have a way to call `jumpTo` when we can guarantee that the min / max scroll offsets are updated for the new zoom value.
I attempted to set these offsets manually using `scrollController.position.applyContentDimensions(minScrollOffset, maxScrollOffset)` but this results in an error regarding gesture detectors: `The replaceGestureRecognizers() method can only be called during the layout phase.`
Beitragsleitfaden
Rechercherichtung
Beginne in flame_chart.dart beim Listener von zoomController und dem Aufruf linkedHorizontalScrollControllerGroup.jumpTo(newScrollOffset). Reproduziere das Zoomen in der Nähe einer Scroll-Grenze und überprüfe dann, dass jumpTo nur ausgeführt wird, nachdem die neuen minimalen/maximalen Scroll-Offsets verfügbar sind, ohne ein ballistisches Zurückschnellen oder den Layout-Fehler des Gestenerkenners auszulösen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- dart, flutter
- Bereich
- data-visualization, frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100