ydshieh HF staff commited on
Commit
5af4e8b
1 Parent(s): 863f2c8

Update split.js

Browse files
Files changed (1) hide show
  1. split.js +4 -19
split.js CHANGED
@@ -21,20 +21,6 @@ var dragging = false;
21
  var stack;
22
  function fixDragBtn() {
23
 
24
- if (!added && window.addEventListener && document.getElementById("dragbar") != null) {
25
- console.log(document.getElementById("dragbar"));
26
- console.log("****************")
27
- document.getElementById("dragbar").addEventListener("mousedown", function(e) {dragstart(e);});
28
- document.getElementById("dragbar").addEventListener("touchstart", function(e) {dragstart(e);});
29
- window.addEventListener("mousemove", function(e) {dragmove(e);});
30
- window.addEventListener("touchmove", function(e) {dragmove(e);});
31
- window.addEventListener("mouseup", dragend);
32
- window.addEventListener("touchend", dragend);
33
- window.addEventListener("load", fixDragBtn);
34
- added = true;
35
- } else {return;}
36
-
37
-
38
  var leftpadding, dragleft, buttonwidth
39
 
40
  var containertop = Number(w3_getStyleValue(document.getElementById("container"), "top").replace("px", ""));
@@ -119,10 +105,9 @@ function w3_getStyleValue(elmnt,style) {
119
  console.log(document.getElementById("container"));
120
  console.log("***");
121
 
122
- // while (window.addEventListener && document.getElementById("container") == null) {
123
- // continue;
124
- // }
125
-
126
  console.log(document.getElementById("container"));
127
  console.log("*");
128
- fixDragBtn();
 
 
 
21
  var stack;
22
  function fixDragBtn() {
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  var leftpadding, dragleft, buttonwidth
25
 
26
  var containertop = Number(w3_getStyleValue(document.getElementById("container"), "top").replace("px", ""));
 
105
  console.log(document.getElementById("container"));
106
  console.log("***");
107
 
108
+ if (window.addEventListener && document.getElementById("container") == null) {
 
 
 
109
  console.log(document.getElementById("container"));
110
  console.log("*");
111
+ fixDragBtn();
112
+ }
113
+