Header settings should be ignored when 'Fixed Header' is turned off. #327
This commit is contained in:
parent
9ac2500e38
commit
fc56c68ece
@ -428,7 +428,7 @@ Header =
|
|||||||
scrollTo: (root, down, needed) ->
|
scrollTo: (root, down, needed) ->
|
||||||
if down
|
if down
|
||||||
x = Header.getBottomOf root
|
x = Header.getBottomOf root
|
||||||
if Conf['Header auto-hide on scroll'] and Conf['Bottom header']
|
if Conf['Fixed Header'] and Conf['Header auto-hide on scroll'] and Conf['Bottom header']
|
||||||
{height} = Header.bar.getBoundingClientRect()
|
{height} = Header.bar.getBoundingClientRect()
|
||||||
if x <= 0
|
if x <= 0
|
||||||
x += height if !Header.isHidden()
|
x += height if !Header.isHidden()
|
||||||
@ -437,7 +437,7 @@ Header =
|
|||||||
window.scrollBy 0, -x unless needed and x >= 0
|
window.scrollBy 0, -x unless needed and x >= 0
|
||||||
else
|
else
|
||||||
x = Header.getTopOf root
|
x = Header.getTopOf root
|
||||||
if Conf['Header auto-hide on scroll'] and !Conf['Bottom header']
|
if Conf['Fixed Header'] and Conf['Header auto-hide on scroll'] and !Conf['Bottom header']
|
||||||
{height} = Header.bar.getBoundingClientRect()
|
{height} = Header.bar.getBoundingClientRect()
|
||||||
if x >= 0
|
if x >= 0
|
||||||
x += height if !Header.isHidden()
|
x += height if !Header.isHidden()
|
||||||
@ -458,7 +458,7 @@ Header =
|
|||||||
getBottomOf: (root) ->
|
getBottomOf: (root) ->
|
||||||
{clientHeight} = doc
|
{clientHeight} = doc
|
||||||
bottom = clientHeight - root.getBoundingClientRect().bottom
|
bottom = clientHeight - root.getBoundingClientRect().bottom
|
||||||
if Conf['Bottom Header']
|
if Conf['Fixed Header'] and Conf['Bottom Header']
|
||||||
headRect = Header.toggle.getBoundingClientRect()
|
headRect = Header.toggle.getBoundingClientRect()
|
||||||
bottom -= clientHeight - headRect.bottom + headRect.height
|
bottom -= clientHeight - headRect.bottom + headRect.height
|
||||||
bottom
|
bottom
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user