Adimac93 / bimetable

Calendar event management
0 stars 0 forks source link

Fix scroll/zoom edge cases in week timeline view #2

Open pkb-pmj opened 1 year ago

pkb-pmj commented 1 year ago

You can't zoom out the timeline vertically past a certain limit. Originally, when writing https://github.com/Adimac93/bimetable/commit/6fe6d058871f6d2b9e74ba9ac00bc8cd540c368c#diff-d9b9a654f727d6cd4733bd567cd3501d9374ac3e99cbfbedb4b5e42e552cbdd9R82, I thought it was caused by the limit incorrectly including the header height.

pkb-pmj commented 1 year ago

The problem is more subtle. The container height is set as expected. This seemingly incorrect zoom limit is actually the content overflowing the grid container. That theoretically ensures the content has enough vertical space on a short screen, even if it means you can't see the entire day, without any additional code. But that itself might introduce another problem - it's not handled by the code. The (minor) problem that is visible though is some unnecessary scrolling after reaching the zoom limit (you have to first scroll a bit to the bottom and then zoom out). I don't know yet how to handle this, because there seems to be no easy way to get the min-content height in JavaScript.

vmhmmo2020 commented 8 months ago

Good