Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug with flame chart mouse position calculation #5676

Merged
merged 3 commits into from Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -418,7 +418,8 @@ abstract class FlameChartState<T extends FlameChart,
/// Returns -1 if the row index is out of range for [rows].
int _rowIndexForY(double dy) {
final topPaddingHeight = rowOffsetForTopPadding * sectionSpacing;
final rowIndex = ((dy - topPaddingHeight) ~/ rowHeightWithPadding) +
final adjustedDy = verticalControllerGroup.offset + dy;
final rowIndex = ((adjustedDy - topPaddingHeight) ~/ rowHeightWithPadding) +
rowOffsetForTopPadding;
if (rowIndex < 0 || rowIndex >= rows.length) {
return -1;
Expand Down
Expand Up @@ -15,7 +15,7 @@ TODO: Remove this section if there are not any general updates.
TODO: Remove this section if there are not any general updates.

## CPU profiler updates
TODO: Remove this section if there are not any general updates.
* Fix bug with CPU flame chart selection and tooltips - [#5676](https://github.com/flutter/devtools/pull/5676)

## Memory updates
TODO: Remove this section if there are not any general updates.
Expand Down