scroll doc page
This commit is contained in:
@@ -1738,11 +1738,12 @@ body.n_scroll{
|
|||||||
|
|
||||||
.left_curtain_documentation{
|
.left_curtain_documentation{
|
||||||
width: 373px;
|
width: 373px;
|
||||||
|
height: fit-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tree_documentation_container{
|
.tree_documentation_container{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100vh - 295px);
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
.tree_documentation_container.hide_scroll::-webkit-scrollbar{
|
.tree_documentation_container.hide_scroll::-webkit-scrollbar{
|
||||||
@@ -1878,6 +1879,7 @@ body.n_scroll{
|
|||||||
.flex_container_tree_and_content{
|
.flex_container_tree_and_content{
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content_part_tree_els{
|
.content_part_tree_els{
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
@media (max-width: 1024px) {
|
@media (max-width: 1024px) {
|
||||||
.left_curtain_documentation{
|
.left_curtain_documentation{
|
||||||
width: 320px;
|
width: 320px;
|
||||||
|
height: 100vh;
|
||||||
}
|
}
|
||||||
.tree_documentation_container_first_level_txt{
|
.tree_documentation_container_first_level_txt{
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@@ -49,6 +50,7 @@
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.content_part_tree_els{
|
.content_part_tree_els{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -584,6 +584,7 @@ function showContentPartTree (el) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let waitingTop = null
|
let waitingTop = null
|
||||||
|
let maxScroll = null
|
||||||
$(window).scroll(function (){
|
$(window).scroll(function (){
|
||||||
if (getInfoAboutUser()[0] !== 'laptop' && getInfoAboutUser()[0] !== 'mobile'){
|
if (getInfoAboutUser()[0] !== 'laptop' && getInfoAboutUser()[0] !== 'mobile'){
|
||||||
if (window.location.href.includes("docs")){
|
if (window.location.href.includes("docs")){
|
||||||
@@ -591,20 +592,31 @@ $(window).scroll(function (){
|
|||||||
let scroll = $(window)[0].scrollY
|
let scroll = $(window)[0].scrollY
|
||||||
if (scroll === 0){
|
if (scroll === 0){
|
||||||
waitingTop = $(".left_curtain_documentation")[0].getBoundingClientRect().top - 172
|
waitingTop = $(".left_curtain_documentation")[0].getBoundingClientRect().top - 172
|
||||||
|
maxScroll = $(".documentation_block")[0].getBoundingClientRect().bottom - $(".left_curtain_documentation")[0].offsetHeight - 172
|
||||||
}
|
}
|
||||||
let $new_curtain = $($curtain[1])
|
let $new_curtain = $($curtain[1])
|
||||||
if (!$curtain[1] && waitingTop){
|
if (scroll < maxScroll || !maxScroll){
|
||||||
$new_curtain = $curtain.clone()
|
if (!$curtain[1] && waitingTop){
|
||||||
$new_curtain.insertAfter($curtain)
|
$new_curtain = $curtain.clone()
|
||||||
}
|
$new_curtain.insertAfter($curtain)
|
||||||
if (scroll >= waitingTop && waitingTop){
|
}
|
||||||
$new_curtain.css({position:'fixed',top: 166})
|
if (scroll >= waitingTop && waitingTop){
|
||||||
|
$new_curtain.css({position:'fixed',top: 166,bottom:"unset"})
|
||||||
|
$($curtain[0]).css({opacity:0})
|
||||||
|
} else if (scroll < waitingTop && waitingTop) {
|
||||||
|
$new_curtain.remove()
|
||||||
|
$($curtain[0]).css({opacity:1})
|
||||||
|
} else if (!waitingTop){
|
||||||
|
waitingTop = $(".left_curtain_documentation")[0].getBoundingClientRect().top - 172
|
||||||
|
maxScroll = $(".documentation_block")[0].getBoundingClientRect().bottom - $(".left_curtain_documentation")[0].offsetHeight - 172
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!$curtain[1]){
|
||||||
|
$new_curtain = $curtain.clone()
|
||||||
|
$new_curtain.insertAfter($curtain)
|
||||||
|
}
|
||||||
|
$new_curtain.css({position:'absolute',bottom: 0,top: 'unset'})
|
||||||
$($curtain[0]).css({opacity:0})
|
$($curtain[0]).css({opacity:0})
|
||||||
} else if (scroll < waitingTop && waitingTop) {
|
|
||||||
$new_curtain.remove()
|
|
||||||
$($curtain[0]).css({opacity:1})
|
|
||||||
} else if (!waitingTop){
|
|
||||||
waitingTop = $(".left_curtain_documentation")[0].getBoundingClientRect().top - 172
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user