ydshieh HF staff commited on
Commit
04b67a1
·
verified ·
1 Parent(s): c8924ed

Update split.js

Browse files
Files changed (1) hide show
  1. split.js +6 -1
split.js CHANGED
@@ -21,6 +21,11 @@ var dragging = false;
21
  var stack;
22
  function fixDragBtn() {
23
 
 
 
 
 
 
24
  // This is the actual value of the already updated document!
25
  var doc = document.documentElement.getBoundingClientRect();
26
 
@@ -29,7 +34,7 @@ function fixDragBtn() {
29
 
30
 
31
 
32
- var h = window.visualViewport.height - (rect.top - doc.top) - 16 - 16 - 21 + 16;
33
  hello.style.height = `${h}px`;
34
 
35
  console.log(window.visualViewport.height);
 
21
  var stack;
22
  function fixDragBtn() {
23
 
24
+ var gradio_container = document.getElementsByClassName("gradio-container")[0];
25
+ var pb = gradio_container.currentStyle["padding-bottom"];
26
+ console.log(pb);
27
+
28
+
29
  // This is the actual value of the already updated document!
30
  var doc = document.documentElement.getBoundingClientRect();
31
 
 
34
 
35
 
36
 
37
+ var h = window.visualViewport.height - (rect.top - doc.top) - pb - 21;
38
  hello.style.height = `${h}px`;
39
 
40
  console.log(window.visualViewport.height);