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

Timeline: Event items jump around as I pan in X #1786

Open
ChrisAndersonFV opened this issue Apr 4, 2024 · 1 comment
Open

Timeline: Event items jump around as I pan in X #1786

ChrisAndersonFV opened this issue Apr 4, 2024 · 1 comment

Comments

@ChrisAndersonFV
Copy link

ChrisAndersonFV commented Apr 4, 2024

I have noticed that when I have many event items on a timeline, they are stacked and laid out nicely at first. But as I pan to the right, the items start to jump around. This seems to be due to items getting removed from the DOM (or layout algorithm?) as they go out of "range". This makes sense from a performance standpoint, but it causes knock-on effects to the layout of items such that sometimes an item I am looking at just jumps away, often offscreen, which is jarring.

I would love it if I can modify vis-timeline such that I can have stability of layout during X/Y panning. Of course zooming will cause a re-layout, but it would be awesome if panning did not, if everything just stayed in place.

I have started looking into the code to try and make this change, as I don't see an option for it. But I would super appreciate any tips related to this if anyone has had this issue?

Thanks!!!

@devio-at
Copy link

@ChrisAndersonFV I noticed the same phenomenon.
The problem seems to arise from Group.redraw() calculating default heights for Timeline entries not currently displayed (especially if group need to display in several lines),
After going through the code (and adding lots of logging), setting TimelineOptions.groupHeightMode to 'fixed' solved the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants