File tree Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,9 @@ const BubbleSort = {
19
19
ctx . clearRect ( 0 , 0 , CH , CW )
20
20
const lineSpacing = 10
21
21
ctx . lineWidth = 5
22
- << < << << HEAD
23
22
for ( let j = 1 ; j < this . seedValue . length ; j ++ ) {
24
- === === =
25
23
26
24
for ( let j = 0 ; j < this . seedValue . length ; j ++ ) {
27
- >>> >>> > 141 ad495338db7854c07ee1ae9ffeeb6ebc6f429
28
25
const y = j * lineSpacing
29
26
ctx . beginPath ( )
30
27
ctx . moveTo ( y , CH )
@@ -40,7 +37,8 @@ const BubbleSort = {
40
37
ctx . stroke ( )
41
38
}
42
39
}
43
- } ,
40
+ }
41
+ } ,
44
42
update ( ) {
45
43
46
44
if ( this . seedValue [ this . j ] > this . seedValue [ this . j + 1 ] ) {
@@ -82,8 +80,7 @@ const BubbleSort = {
82
80
// You could use window.requestAnimationFrame as well. but, for simplicity i'm using setInterval.
83
81
let cleaer ;
84
82
stopButton . addEventListener ( 'click' , ( ) => {
85
- // p
86
- // clearInterval(cleaer);
83
+ clearInterval ( cleaer ) ;
87
84
} )
88
85
function render ( ) {
89
86
BubbleSort . startup ( )
Original file line number Diff line number Diff line change 1
1
body {
2
- <<<<<<< HEAD
3
2
display : grid;
4
3
place-items : center;
5
4
min-height : 100vh ;
20
19
width : auto;
21
20
height : auto;
22
21
}
23
- = = = = = = =
24
- background- color : gray;
25
- dis play: flex;
26
- justify- content: center;
27
- align- items: center;
28
- min- height: 100vh;
29
- overflow: hidden;
30
- }
31
- > > > > > > > 141ad495338db7854c07ee1ae9ffeeb6ebc6f429
22
+
Original file line number Diff line number Diff line change 69
69
/> </ label
70
70
> < br />
71
71
</ div >
72
- < canvas id ="cvs "> </ canvas >
73
- </ div >
74
72
<!-- The main section when all things will heppening -->
75
73
<!-- The main section when all things will heppening -->
76
74
< canvas id ="cvs "> </ canvas >
75
+ </ div >
77
76
< script src ="./assets/js/index.js "> </ script >
78
77
</ body >
79
78
</ html >
You can’t perform that action at this time.
0 commit comments