Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Printed timeline label+content misaligned for multiple pages #4279

Open
bg opened this issue Apr 2, 2019 · 0 comments
Open

Printed timeline label+content misaligned for multiple pages #4279

bg opened this issue Apr 2, 2019 · 0 comments

Comments

@bg
Copy link

bg commented Apr 2, 2019

When a timeline has a large height, such that when printed, it is printed to more than one page, group labels end up misaligned with the timeline content cells. See this minimal failing example, based on the groups example code, but modified to inflate the number of groups so that it spans multiple pages when printed.

https://jsbin.com/datovitunu/1/edit?html,output

Here's a screenshot of part of the print preview in Chrome:

2019-04-02 11_17_45-Window

This looks like #825, closed in 2016 due to inactivity. I am currently experiencing this problem with some of our production code. While arguably the printed output will be sloppy without a redesign of our graph into an explicitly paginated form due to awkward splits of the bars on the graph across page boundaries, I can see some of our users potentially willing to live with that so long as the rest of it prints properly across multiple sheets. So I do think this is a realistic use case that should be supported.

I briefly experimented with triggering a resize & redraw of the whole graph on beforePrint, but the graph generation took sufficiently long that the page wasn't ready before it was printed, resulting in it being mostly blank. I later thought about this and figure I could probably wrap that in a setTimeout to give enough time for the redraw before invoking print(), but that seems horribly clumsy. I thought before I explored more in this direction, I had better see if you have any further thoughts on #825 as to whether there is the possibility of some practical & clean solution to this problem now.

Ben

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

No branches or pull requests

1 participant