-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsorting.js
48 lines (41 loc) · 1.16 KB
/
sorting.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
*****************************
DONE BY : NAVDEEP KHEDE
E-MAIL : [email protected]
*****************************
*/
var delay_time = 1000/(Math.floor(ar_size/10));
var c_delay = 0;
var speed_inp = 0;
for(let i=0; i<speed.length;i++)
{
speed[i].addEventListener("click", speedModule);
}
function speedModule()
{
speed_inp = this.value;
delay_time = 10000/(Math.floor(ar_size/10)*speed_inp);
}
function div_update(cont, height, color)
{
window.setTimeout(function(){
cont.style = "margin: 0%"+ margin_size + "%; width:" + (100/ar_size-(2*margin_size)) + "%; height:" + height + "%; background-color:" + color + "; border-radius:0px 0px 15px 15px; transition: 0.6s all ease-in-out;";
} , c_delay+=delay_time);
}
function enable_buttons()
{
window.setTimeout(function(){
for(var i=0; i<butts_algos.length; i++)
{
butts_algos[i].disabled = false;
gen_ar.disabled = false;
inp_as.disabled = false;
}
}, c_delay+=delay_time);
}
/*
*****************************
DONE BY : NAVDEEP KHEDE
E-MAIL : [email protected]
*****************************
*/