UX: Use header top to calculate docking position
This commit is contained in:
parent
777364df01
commit
d078808144
|
@ -24,13 +24,14 @@ const SiteHeaderComponent = MountWidget.extend(Docking, {
|
||||||
},
|
},
|
||||||
|
|
||||||
dockCheck(info) {
|
dockCheck(info) {
|
||||||
const $body = $("body");
|
const $header = $("header.d-header");
|
||||||
|
|
||||||
if (this.docAt === null) {
|
if (this.docAt === null) {
|
||||||
if (!($body && $body.length === 1)) return;
|
if (!($header && $header.length === 1)) return;
|
||||||
this.docAt = $body.offset().top;
|
this.docAt = $header.offset().top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const $body = $("body");
|
||||||
const offset = info.offset();
|
const offset = info.offset();
|
||||||
if (offset >= this.docAt) {
|
if (offset >= this.docAt) {
|
||||||
if (!this.dockedHeader) {
|
if (!this.dockedHeader) {
|
||||||
|
|
Loading…
Reference in New Issue