ka215 / jquery.timeline

You can easily create the horizontal timeline with two types by using this jQuery plugin.
MIT License
240 stars 43 forks source link

How to decrease width for weeks in ruler #54

Open Flemmingc opened 4 years ago

Flemmingc commented 4 years ago

I sometimes find that the width used for displaying weeks are much wider than necessary - causing the scrollbars and the whole view to be rather wide. Is there a way to limit the width for weeks and thereby make a less wide visualization/scrollbar? I know there is a minimum setting, but what about a maximum setting - or som rule for calculating the width? The example below would display a lot better if the weeks where much smaller. Timeline Week display

ka215 commented 4 years ago

Hi, that was a bug.

The grid width of one of the rulers depends on "minGridSize", which is the smallest unit of "scale" on the timeline. However, if the "scale" is "week", the width of the week is calculated as "minGridSize" x 7 (days). All ruler grid widths must be modified to comply with the scale value. It's my job so. The current urgent workaround is to set "minGridSize" to 1/7 of the width you want to specify if you want the width of the week to be any width when "scale" is set to "week".

Thank you,

Flemmingc commented 4 years ago

Thank you for quick answer. I will try your given workaround.

Thank you!

ka215 commented 3 years ago

This bug has been fixed in version 2.1.2.