ydshieh HF staff commited on
Commit
766271a
·
verified ·
1 Parent(s): 37846ef

Update split.js

Browse files
Files changed (1) hide show
  1. split.js +17 -3
split.js CHANGED
@@ -18,6 +18,20 @@ function browserResize() {
18
  var dragging = false;
19
  var stack;
20
  function fixDragBtn() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  var leftpadding, dragleft, buttonwidth
22
 
23
  var containertop = Number(w3_getStyleValue(document.getElementById("container"), "top").replace("px", ""));
@@ -102,9 +116,9 @@ function w3_getStyleValue(elmnt,style) {
102
  console.log(document.getElementById("container"));
103
  console.log("***");
104
 
105
- while (window.addEventListener && document.getElementById("container") == null) {
106
- continue;
107
- }
108
 
109
  console.log(document.getElementById("container"));
110
  console.log("*");
 
18
  var dragging = false;
19
  var stack;
20
  function fixDragBtn() {
21
+
22
+ if (window.addEventListener && document.getElementById("dragbar") != null) {
23
+ console.log(document.getElementById("dragbar"));
24
+ console.log("****************")
25
+ document.getElementById("dragbar").addEventListener("mousedown", function(e) {dragstart(e);});
26
+ document.getElementById("dragbar").addEventListener("touchstart", function(e) {dragstart(e);});
27
+ window.addEventListener("mousemove", function(e) {dragmove(e);});
28
+ window.addEventListener("touchmove", function(e) {dragmove(e);});
29
+ window.addEventListener("mouseup", dragend);
30
+ window.addEventListener("touchend", dragend);
31
+ window.addEventListener("load", fixDragBtn);
32
+ }
33
+
34
+
35
  var leftpadding, dragleft, buttonwidth
36
 
37
  var containertop = Number(w3_getStyleValue(document.getElementById("container"), "top").replace("px", ""));
 
116
  console.log(document.getElementById("container"));
117
  console.log("***");
118
 
119
+ // while (window.addEventListener && document.getElementById("container") == null) {
120
+ // continue;
121
+ // }
122
 
123
  console.log(document.getElementById("container"));
124
  console.log("*");