Skip to content

Commit 956a38a

Browse files
committed
debugging mobile
1 parent 7d694ef commit 956a38a

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

_layouts/splash.html

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,8 @@
8181
const h = Math.max(minHeight, curHeight - currentScrollY);
8282
dynamicDiv.style.height = h + 'px';
8383
curHeight = h;
84-
console.log({
85-
intended: h,
86-
inline: dynamicDiv.style.height,
87-
computed: getComputedStyle(dynamicDiv).height,
88-
offset: dynamicDiv.offsetHeight
89-
});
9084
window.scrollTo(currentScrollX, 0);
9185
// Force recompute of height:
92-
const dummy_h = dynamicDiv.style.height;
9386
const opac = (h - vanishHeight) / (maxHeight - vanishHeight);
9487
splashTxt.forEach((el) => {
9588
if (h <= vanishHeight) {
@@ -114,7 +107,7 @@
114107
splashBanner = document.getElementsByClassName('splash-banner')[0];
115108
splashLogoTxt = document.getElementsByClassName('splash-banner-logotext')[0];
116109
maxHeight = dynamicDiv.offsetHeight;
117-
curHeight = maxHeight;
110+
curHeight = parseFloat(dynamicDiv.style.height) || dynamicDiv.offsetHeight; //maxHeight;
118111
vanishHeight = minHeight + (maxHeight - minHeight) * 0.4;
119112
splashTxt = document.querySelectorAll('.splash-text');
120113
window.addEventListener('scroll', scrollFn);

0 commit comments

Comments
 (0)