Skip to content

Commit d5d14d3

Browse files
authored
Merge pull request #4 from DSDmark/test
UPDATE
2 parents 72e3960 + 681495d commit d5d14d3

File tree

6 files changed

+81
-10
lines changed

6 files changed

+81
-10
lines changed

.index.html.swp

12 KB
Binary file not shown.

assets/js/.index.js.swo

0 Bytes
Binary file not shown.

assets/js/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ const CH = (canvas.height = 300)
44
const CW = (canvas.width = 600)
55
canvas.style.background = 'black'
66

7+
8+
79
const BubbleSort = {
810
i: 0,
911
j: 0,
@@ -18,7 +20,6 @@ const BubbleSort = {
1820
ctx.clearRect(0, 0, CH, CW)
1921
const lineSpacing = 10
2022
ctx.lineWidth = 5
21-
2223
for (let j = 0; j < this.seedValue.length; j++) {
2324
const y = j * lineSpacing
2425
ctx.beginPath()

assets/style/style.css

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
body{
2-
background-color: gray;
3-
display: flex;
4-
justify-content: center;
5-
align-items: center;
6-
min-height: 100vh;
7-
overflow: hidden;
8-
}
2+
display:grid;
3+
place-items:center;
4+
min-height:100vh;
5+
background:gray;
6+
}
7+
.tab {
8+
display:flex;
9+
width: auto;
10+
height: 300px;
11+
}
12+
.inputField{
13+
display:flex;
14+
align-items:left;
15+
padding:3px;
16+
flex-direction:column;
17+
border: 1px solid #ccc;
18+
background-color: #f1f1f1;
19+
line-height:1.5rem;
20+
width: auto;
21+
height:auto;
22+
}

index.html

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,64 @@
88
<link rel="stylesheet" href="./assets/style/style.css" />
99
</head>
1010
<body>
11-
<!-- The main section when all things will heppening -->
12-
<canvas id="cvs"></canvas>
11+
<div class="tab">
12+
<div class="inputField">
13+
<label for="sizeoflines">
14+
Size of lines:<br />
15+
<input
16+
class="tablinks"
17+
type="range"
18+
id="sizeoflines"
19+
min="0"
20+
max="100"
21+
value="50"
22+
/>
23+
</label>
24+
<label for="numberoflines">
25+
Number of lines:<br />
26+
<input
27+
class="tablinks"
28+
id="numberoflines"
29+
type="range"
30+
min="0"
31+
max="100"
32+
value="50"
33+
/>
34+
</label>
35+
<button
36+
class="tablinks"
37+
id="stopbutton"
38+
/>Stop Sorting</button> <br />
39+
<label for="sizeofcanvas">
40+
Size of canvas(lenght):<br />
41+
<input
42+
class="tablinks"
43+
id="sizeofcanvas"
44+
type="range"
45+
min="0"
46+
max="100"
47+
value="50"
48+
/> </label
49+
><br />
50+
<label for="sortedlinecolor">
51+
Sorted line color:<br />
52+
<input
53+
class="tablinks"
54+
id="sortedlinecolor"
55+
value="red"
56+
/> </label><br />
57+
<label for="lienescolors">
58+
colors of lines:<br />
59+
<input
60+
class="tablinks"
61+
id="linescolors"
62+
type="text" value="white"
63+
/> </label
64+
><br />
65+
</div>
66+
<canvas id="cvs"></canvas>
67+
</div>
68+
<!-- The main section when all things will heppening -->
1369
<script src="./assets/js/index.js"></script>
1470
</body>
1571
</html>

0 commit comments

Comments
 (0)