From 7a95c5c3effbe99cb8be504586bd50846adfdfe5 Mon Sep 17 00:00:00 2001 From: SBD Date: Thu, 18 Jul 2024 14:18:42 +0300 Subject: [PATCH] documentation page --- static/aerbimJS.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/static/aerbimJS.js b/static/aerbimJS.js index f12f65f..df29684 100644 --- a/static/aerbimJS.js +++ b/static/aerbimJS.js @@ -602,9 +602,11 @@ function showContentPartTree (el) { $($arrow).css({rotate: '0deg'}) } let scroll = $(window)[0].scrollY - $($(".left_curtain_documentation")[1]).find(".tree_documentation_container").css({height: 'fit-content'}) - maxScroll = scroll + $(".documentation_block")[0].getBoundingClientRect().bottom - $(".left_curtain_documentation")[1].offsetHeight - 172 - $($(".left_curtain_documentation")[1]).find(".tree_documentation_container").css({height: 'calc(100vh - 300px)'}) + if ($(".left_curtain_documentation")[1]) { + $($(".left_curtain_documentation")[1]).find(".tree_documentation_container").css({height: 'fit-content'}) + maxScroll = scroll + $(".documentation_block")[0].getBoundingClientRect().bottom - $(".left_curtain_documentation")[1].offsetHeight - 172 + $($(".left_curtain_documentation")[1]).find(".tree_documentation_container").css({height: 'calc(100vh - 300px)'}) + } } let waitingTop = null let maxScroll = null