File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -58,21 +58,17 @@ export class MicrobitMatrix {
58
58
return ;
59
59
}
60
60
61
+ this . matrix = await this . services . ledService . getMatrixState ( ) ;
61
62
await this . updateMatrix ( ) ;
62
63
}
63
64
64
- render ( ) {
65
- return < div > </ div > ;
66
- }
67
-
68
65
private async toggle ( row : number , column : number ) {
69
66
this . matrix [ row ] [ column ] = ! this . matrix [ row ] [ column ] ;
70
67
await this . services . ledService . setMatrixState ( this . matrix ) ;
71
68
await this . updateMatrix ( ) ;
72
69
}
73
70
74
71
private async updateMatrix ( ) {
75
- this . matrix = await this . services . ledService . getMatrixState ( ) ;
76
72
this . matrix . forEach ( ( rows : Boolean [ ] , row ) => {
77
73
rows . forEach ( ( value : boolean , column ) => {
78
74
const led = this . elements [ row ] [ column ] ;
Original file line number Diff line number Diff line change 27
27
.microbit-matrix {
28
28
display : flex;
29
29
flex-wrap : wrap;
30
- justify-content : space-between;
31
- align-content : space-between;
32
- width : 170px ;
33
- height : 170px ;
30
+ width : 155px ;
34
31
background-color : black;
35
32
}
36
33
.microbit-matrix-led {
You can’t perform that action at this time.
0 commit comments