fix local forecast pagination when full screen
This commit is contained in:
parent
e9b0bef023
commit
7a457745df
8 changed files with 3106 additions and 2828 deletions
|
|
@ -44,7 +44,7 @@ class LocalForecast extends WeatherDisplay {
|
|||
forecastsElem.append(...templates);
|
||||
|
||||
// increase each forecast height to a multiple of container height
|
||||
this.pageHeight = forecastsElem.parentNode.getBoundingClientRect().height;
|
||||
this.pageHeight = forecastsElem.parentNode.scrollHeight;
|
||||
templates.forEach((forecast) => {
|
||||
const newHeight = Math.ceil(forecast.scrollHeight / this.pageHeight) * this.pageHeight;
|
||||
forecast.style.height = `${newHeight}px`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue