From 279ed3d59493d2192df2fd7c797a494c8d713a53 Mon Sep 17 00:00:00 2001 From: amy Date: Thu, 23 Feb 2023 15:20:17 +0000 Subject: swapped old scrollbars --- src/window-utils.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/window-utils.js') diff --git a/src/window-utils.js b/src/window-utils.js index f45dd0f..149b9d0 100644 --- a/src/window-utils.js +++ b/src/window-utils.js @@ -21,13 +21,14 @@ let util = { //target is where the scrollbar will be placed, this element should be //larger than the root with scrollable overflow let scrolling = false - if(!procs[uid]) + if(undefined==procs[uid]) procs[uid] = {} target.innerHTML += "
" let thi_point = document.getElementById(uid + "-" + minor_uid + "-content-scrollbar-point") let thi_base = document.getElementById(uid + "-" + minor_uid + "-content-scrollbar") procs[uid].refresh = ()=>{ - console.log(root.clientHeight / (target.clientHeight / root.clientHeight) / root.clientHeight) + + //console.log(root.clientHeight / (target.clientHeight / root.clientHeight) / root.clientHeight) thi_point.style.display = "block" thi_base.style.display = "block" thi_point.style.height = root.clientHeight / (target.clientHeight / root.clientHeight) @@ -35,6 +36,10 @@ let util = { thi_point.style.display = "none" thi_base.style.display = "none" } + + if(thi_base.clientHeight { -- cgit v1.2.3