Flame chart - jumpTo called before scroll position offsets have new size
- Langage dominant
- Dart
- Étoiles
- 1.7k
- Forks
- 404
- Merge moyen
- 6 j 17 h
- PR mergées (30 j)
- 18
Description
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.`
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start in flame_chart.dart at the zoomController listener and the linkedHorizontalScrollControllerGroup.jumpTo(newScrollOffset) call. Reproduce zooming near a scroll boundary, then verify that jumpTo runs only after the new min/max scroll offsets are available, without triggering ballistic bounce or the gesture-detector layout error.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- dart, flutter
- Domaine
- data-visualization, frontend
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100