-
Notifications
You must be signed in to change notification settings - Fork 7
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
Timeline zooming and panning #1006
Conversation
f298c62
to
1950431
Compare
ce852f4
to
8a5d8ef
Compare
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.
I'm good with this! It's muuuch easier to get to anywhere on the timeline. Also, the tooltip taking a shortcut change 🥇.
I'm also good with getting this merged in prior to testing on Windows. If we can get this deployed on dev, then it might be more easily accessible for users with Windows to test out.
f8ca1b4
to
0d79bd1
Compare
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.
Tested the features noted in the #986 checklist and everything looks good, I think this is good to go! Thanks @AaronPlave. Two very small "take it or leave it" notes -
- I think the current behavior is "If Mac, use Cmd key as modifier, else use Control". I wouldn't mind if both keys worked on both systems, to make it easier for people who use both, since we're unlikely to override the other cmd/ctrl key for any other uses.
- I did have a hiccup while running this at first - after
npm install
andnpm run dev
I got the error below & had torm -rf node_modules
& reinstall to get it to run. Possibly related to thepackage-lock
changes, not sure if anyone else will hit this.
The key that's the spatial equivalent to |
Ctrl + click on Mac opens the context menu so don't think that'd work, not something we'd want to override. I think for now I'm in the camp of let it be a single key for each OS and if it proves to be difficult for people to remember then we can perhaps find a different modifier key? |
* Add d3-zoom * Zoom and pan around timeline, histogram, and x-axis using command/control on mac/windows * Prevent layer activity mouse down interactions if meta/ctrl is pressed * Remove temporary unlock on timeline lock control * Implement TimelineInteractionMode control button * Use computed tooltip params when updating tooltip props * Fix for previously shown tooltips disappearing after menu open or hover * Use tooltip shortcut props for ValueSourceBadge
* Add d3-zoom * Zoom and pan around timeline, histogram, and x-axis using command/control on mac/windows * Prevent layer activity mouse down interactions if meta/ctrl is pressed * Remove temporary unlock on timeline lock control * Implement TimelineInteractionMode control button * Use computed tooltip params when updating tooltip props * Fix for previously shown tooltips disappearing after menu open or hover * Use tooltip shortcut props for ValueSourceBadge
Implements temporal zooming and panning using d3-zoom. Hold command (mac) or control (windows) and scroll on any timeline row to initiate zooming. Use this same key and click and drag to pan. Middle mouse button can also be used instead of the modifier key. This functionality also applies to the x-axis time area as well as the histogram. The histogram currently does not require the user to hold down the modifier key but this needs discussion. Smooth zoom/pan performance is also noticeably worse with simulations that contain a large number of points but this should be addressed separately by general line plot rendering improvements.
Closes #986, see that issue for more commentary.
TODO: