-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestScript.js
59 lines (55 loc) · 1.57 KB
/
testScript.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
49
50
51
52
53
54
55
56
57
58
59
function highlight(name)
{
document.getElementById(name).style.color = "red";
}
function unhighlight(name)
{
document.getElementById(name).style.color = "";
}
function holdHighlight(name)
{
var colored = false;
if(document.getElementById(name).style.color == "red")
{
colored = true;
}
else
{
colored = false;
}
if(colored == false)
{
document.getElementById(name).style.color = "red";
return;
}
else
{
document.getElementById(name).style.color = "";
return;
}
}
function transformLine(x,y,angle,width,length,name)
{
document.getElementById(name).style.position = "absolute";
document.getElementById(name).style.left = x + 'px';
document.getElementById(name).style.top = y + 'px';
document.getElementById(name).style.transform = "rotate(" + angle + "deg)";
document.getElementById(name).style.width = width + 'px';
document.getElementById(name).style.height = length + 'px';
}
function transform(x,y,name)
{
document.getElementById(name).style.position = "absolute";
document.getElementById(name).style.left = x + 'px';
document.getElementById(name).style.top = y + 'px';
}
function openNav() {
document.getElementById("mySidenav").style.width = "250px";
document.getElementById("main").style.marginLeft = "250px";
document.body.style.backgroundColor = "rgba(0,0,0,0.4)";
}
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
document.getElementById("main").style.marginLeft = "0";
document.body.style.backgroundColor = "white";
}