documentation page

This commit is contained in:
SBD
2024-07-16 14:26:20 +03:00
parent 1df287c122
commit b132b9e087
2 changed files with 17 additions and 3 deletions

View File

@@ -1867,7 +1867,7 @@ body.n_scroll{
}
.elements_third_level_content_part_tree{
margin-left: 50px;
margin-left: 40px;
}
.element_third_level_content_part_tree{

View File

@@ -585,6 +585,10 @@ function showContentPartTree (el) {
} else {
$($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)'})
}
let waitingTop = null
let maxScroll = null
@@ -596,7 +600,9 @@ function windowScrollDocPage (){
let scroll = $(window)[0].scrollY
if (scroll === 0){
waitingTop = $(".left_curtain_documentation")[0].getBoundingClientRect().top - 172
$(".left_curtain_documentation").find(".tree_documentation_container").css({height: 'fit-content'})
maxScroll = $(".documentation_block")[0].getBoundingClientRect().bottom - $(".left_curtain_documentation")[0].offsetHeight - 172
$(".left_curtain_documentation").find(".tree_documentation_container").css({height: 'calc(100vh - 300px)'})
}
let $new_curtain = $($curtain[1])
@@ -617,7 +623,9 @@ function windowScrollDocPage (){
$($curtain[0]).find(".tree_documentation_container").css({display:'block'})
} else if (!waitingTop){
waitingTop = $(".left_curtain_documentation")[0].getBoundingClientRect().top - 172
$(".left_curtain_documentation").find(".tree_documentation_container").css({height: 'fit-content'})
maxScroll = $(".documentation_block")[0].getBoundingClientRect().bottom - $(".left_curtain_documentation")[0].offsetHeight - 172
$(".left_curtain_documentation").find(".tree_documentation_container").css({height: 'calc(100vh - 300px)'})
}
} else {
if (!$curtain[1]){
@@ -626,6 +634,7 @@ function windowScrollDocPage (){
let $new_curtain_tree = $new_curtain.find(".tree_documentation_container")
$new_curtain_tree.css({height: 'calc(100vh - 245px);'})
}
$new_curtain.find(".tree_documentation_container").css({height:'fit-content'})
$new_curtain.css({position:'absolute',bottom: 0,top: 'unset'})
$($curtain[0]).css({opacity:0})
}
@@ -639,7 +648,9 @@ $(window).scroll(function (){
let scroll = $(window)[0].scrollY
if (scroll === 0){
waitingTop = $(".left_curtain_documentation")[0].getBoundingClientRect().top - 172
$(".left_curtain_documentation").find(".tree_documentation_container").css({height: 'fit-content'})
maxScroll = $(".documentation_block")[0].getBoundingClientRect().bottom - $(".left_curtain_documentation")[0].offsetHeight - 172
$(".left_curtain_documentation").find(".tree_documentation_container").css({height: 'calc(100vh - 300px)'})
}
let $new_curtain = $($curtain[1])
@@ -648,20 +659,22 @@ $(window).scroll(function (){
$new_curtain = $curtain.clone()
$new_curtain.insertAfter($curtain)
let $new_curtain_tree = $new_curtain.find(".tree_documentation_container")
$new_curtain_tree.css({height: 'calc((100vh) - (245px))'})
$new_curtain_tree.css({height: 'calc(100vh - 245px);'})
}
if (scroll >= waitingTop && waitingTop){
$new_curtain.css({position:'fixed',top: 166,bottom:"unset"})
$($curtain[0]).css({opacity:0})
$($curtain[0]).find(".tree_documentation_container").css({display:'none'})
} else if (scroll < waitingTop && waitingTop) {
$($curtain[0]).find(".tree_documentation_container")[0].innerHTML = $($new_curtain[0]).find(".tree_documentation_container")[0].innerHTML
$curtain.find(".tree_documentation_container")[0].innerHTML = $new_curtain.find(".tree_documentation_container")[0].innerHTML
$new_curtain.remove()
$($curtain[0]).css({opacity:1})
$($curtain[0]).find(".tree_documentation_container").css({display:'block'})
} else if (!waitingTop){
waitingTop = $(".left_curtain_documentation")[0].getBoundingClientRect().top - 172
$(".left_curtain_documentation").find(".tree_documentation_container").css({height: 'fit-content'})
maxScroll = $(".documentation_block")[0].getBoundingClientRect().bottom - $(".left_curtain_documentation")[0].offsetHeight - 172
$(".left_curtain_documentation").find(".tree_documentation_container").css({height: 'calc(100vh - 300px)'})
}
} else {
if (!$curtain[1]){
@@ -670,6 +683,7 @@ $(window).scroll(function (){
let $new_curtain_tree = $new_curtain.find(".tree_documentation_container")
$new_curtain_tree.css({height: 'calc(100vh - 245px);'})
}
$new_curtain.find(".tree_documentation_container").css({height:'fit-content'})
$new_curtain.css({position:'absolute',bottom: 0,top: 'unset'})
$($curtain[0]).css({opacity:0})
}