Hide and don't use the header hitzone when unnecessary.
This commit is contained in:
parent
676381c974
commit
d1a305a888
@ -165,6 +165,9 @@ a[href="javascript:;"] {
|
|||||||
height: 10px;
|
height: 10px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
#header-bar:not(.autohide) #header-bar-hitzone {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
#header.top #header-bar-hitzone {
|
#header.top #header-bar-hitzone {
|
||||||
bottom: -10px;
|
bottom: -10px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,8 +4,8 @@ Header =
|
|||||||
id: 'header'
|
id: 'header'
|
||||||
innerHTML: <%= importHTML('General/Header') %>
|
innerHTML: <%= importHTML('General/Header') %>
|
||||||
|
|
||||||
@bar = $ '#header-bar', headerEl
|
@bar = $ '#header-bar', headerEl
|
||||||
@toggle = $ '#header-bar-hitzone', @bar
|
@hitzone = $ '#header-bar-hitzone', @bar
|
||||||
@noticesRoot = $ '#notifications', headerEl
|
@noticesRoot = $ '#notifications', headerEl
|
||||||
|
|
||||||
@menu = new UI.Menu 'header'
|
@menu = new UI.Menu 'header'
|
||||||
@ -281,14 +281,14 @@ Header =
|
|||||||
getTopOf: (root) ->
|
getTopOf: (root) ->
|
||||||
{top} = root.getBoundingClientRect()
|
{top} = root.getBoundingClientRect()
|
||||||
unless Conf['Bottom header']
|
unless Conf['Bottom header']
|
||||||
headRect = Header.toggle.getBoundingClientRect()
|
headRect = (if $.hasClass Header.bar, 'autohide' then Header.hitzone else Header.bar).getBoundingClientRect()
|
||||||
top -= headRect.top + headRect.height
|
top -= headRect.top + headRect.height
|
||||||
top
|
top
|
||||||
getBottomOf: (root) ->
|
getBottomOf: (root) ->
|
||||||
{clientHeight} = doc
|
{clientHeight} = doc
|
||||||
bottom = clientHeight - root.getBoundingClientRect().bottom
|
bottom = clientHeight - root.getBoundingClientRect().bottom
|
||||||
if Conf['Bottom header']
|
if Conf['Bottom header']
|
||||||
headRect = Header.toggle.getBoundingClientRect()
|
headRect = (if $.hasClass Header.bar, 'autohide' then Header.hitzone else Header.bar).getBoundingClientRect()
|
||||||
bottom -= clientHeight - headRect.bottom + headRect.height
|
bottom -= clientHeight - headRect.bottom + headRect.height
|
||||||
bottom
|
bottom
|
||||||
isHidden: ->
|
isHidden: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user