mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-09 07:25:21 +02:00
sidebar search navigation adjusted
This commit is contained in:
parent
480f79d466
commit
97555e094b
1 changed files with 1 additions and 3 deletions
|
@ -368,10 +368,8 @@ export default class Sidebar {
|
||||||
element.classList.add(Sidebar.CSS.sectionListItemSlelected);
|
element.classList.add(Sidebar.CSS.sectionListItemSlelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// find the parent section.
|
|
||||||
const parentSection = element.closest('section');
|
|
||||||
// check if it's visible.
|
// check if it's visible.
|
||||||
const rect = parentSection.getBoundingClientRect();
|
const rect = element.getBoundingClientRect();
|
||||||
let elemTop = rect.top;
|
let elemTop = rect.top;
|
||||||
let elemBottom = rect.bottom;
|
let elemBottom = rect.bottom;
|
||||||
const halfOfViewport = window.innerHeight / 2;
|
const halfOfViewport = window.innerHeight / 2;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue