projects
/
working
/
eg-antora.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af806a0
)
format source
author
Dan Allen
<dan@opendevise.com>
Wed, 14 Aug 2019 00:15:07 +0000
(18:15 -0600)
committer
Dan Allen
<dan@opendevise.com>
Wed, 14 Aug 2019 00:15:07 +0000
(18:15 -0600)
src/js/01-nav.js
patch
|
blob
|
history
diff --git
a/src/js/01-nav.js
b/src/js/01-nav.js
index
3001c0d
..
3d1a8a7
100644
(file)
--- a/
src/js/01-nav.js
+++ b/
src/js/01-nav.js
@@
-86,7
+86,7
@@
var rect = panel.getBoundingClientRect()
var effectiveHeight = rect.height
var navStyle = window.getComputedStyle(nav)
- if (navStyle.position === 'sticky') effectiveHeight -=
(rect.top - parseFloat(navStyle.top)
)
+ if (navStyle.position === 'sticky') effectiveHeight -=
rect.top - parseFloat(navStyle.top
)
panel.scrollTop = Math.max(0, (el.getBoundingClientRect().height - effectiveHeight) * 0.5 + el.offsetTop)
}