mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-18 09:39:30 -07:00
fix local forecast paging
This commit is contained in:
@@ -47,7 +47,7 @@ class LocalForecast extends WeatherDisplay {
|
|||||||
forecastsElem.append(...templates);
|
forecastsElem.append(...templates);
|
||||||
|
|
||||||
// increase each forecast height to a multiple of container height
|
// increase each forecast height to a multiple of container height
|
||||||
this.pageHeight = forecastsElem.parentNode.scrollHeight;
|
this.pageHeight = forecastsElem.parentNode.offsetHeight;
|
||||||
templates.forEach((forecast) => {
|
templates.forEach((forecast) => {
|
||||||
const newHeight = Math.ceil(forecast.scrollHeight / this.pageHeight) * this.pageHeight;
|
const newHeight = Math.ceil(forecast.scrollHeight / this.pageHeight) * this.pageHeight;
|
||||||
forecast.style.height = `${newHeight}px`;
|
forecast.style.height = `${newHeight}px`;
|
||||||
|
|||||||
Reference in New Issue
Block a user