Update home.tag

This commit is contained in:
syuilo 2017-11-18 10:12:29 +09:00 committed by GitHub
parent acc1008264
commit 235acda851
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -271,9 +271,11 @@
const widgetsBottom = (rect.top + window.scrollY) + rect.height;
if (windowBottom > widgetsBottom && widgetsHeight > window.innerHeight) {
widgets.parentNode.style.marginTop = `${(windowBottom - rect.height) - this.containerTop}px`;
const top = (windowBottom - rect.height) - this.containerTop;
widgets.parentNode.style.marginTop = `${top}px`;
} else if (windowTop < rect.top + window.scrollY || widgetsHeight < window.innerHeight) {
widgets.parentNode.style.marginTop = `${(windowTop - this.containerTop)}px`;
const top = windowTop - this.containerTop;
widgets.parentNode.style.marginTop = `${top}px`;
}
};