-
Notifications
You must be signed in to change notification settings - Fork 336
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
Flame chart zoom and navigation with WASD keys #1611
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is some sophisticated logic that is well-organized and well-explained. Nicely written!
Just a few small suggestions.
|
||
previousZoom = currentZoom; | ||
linkedHorizontalScrollControllerGroup | ||
.jumpTo(newScrollOffset.clamp(minScrollOffset, maxScrollOffset)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entire section is very well explained. Thanks!
// Only handle down events so logic is not duplicated on key up. | ||
if (event is RawKeyDownEvent) { | ||
// Handle zooming / navigation from W-A-S-D keys. | ||
final keyLabel = event.data.keyLabel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: why are we using wsad instead of the arrow keys? is that for compatibility with the observatory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WASD will be familiar for users with experience using other trace viewers (e.g. chrome://tracing, Observatory, etc.). Wdyt about allowing both WASD and the arrow keys to zoom / pan?
Implement flame chart zoom with WASD keys.
Fixes #683
P.S. Excuse the ugly commit history. Rebasing was a nightmare.