Commit 7f3d36cc authored by minseok.park's avatar minseok.park

test -- print scrollItemToMidpoint function log

parent e3f34bbe
Pipeline #19685 passed with stages
in 3 minutes and 21 seconds
...@@ -165,6 +165,9 @@ ...@@ -165,6 +165,9 @@
console.log('calculated top >>>>> ', console.log('calculated top >>>>> ',
Math.max(0, (el.getBoundingClientRect().height - effectiveHeight) * 0.5 + el.offsetTop)) Math.max(0, (el.getBoundingClientRect().height - effectiveHeight) * 0.5 + el.offsetTop))
if (navStyle.position === 'sticky') effectiveHeight -= rect.top - parseFloat(navStyle.top) if (navStyle.position === 'sticky') effectiveHeight -= rect.top - parseFloat(navStyle.top)
console.log('rect top >>>>> ', rect.top)
console.log('navStyle top >>>>> ', parseFloat(navStyle.top))
console.log('calculated panel height >>>>> ', effectiveHeight)
panel.scrollTop = Math.max(0, (el.getBoundingClientRect().height - effectiveHeight) * 0.5 + el.offsetTop) panel.scrollTop = Math.max(0, (el.getBoundingClientRect().height - effectiveHeight) * 0.5 + el.offsetTop)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment