File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class ShapeAlgorithm {
18
18
this . matrix = [ ] ;
19
19
this . labels = [ ] ;
20
20
this . sizes = [ ] ;
21
- this . positions = [ ] ;
21
+ this . positions = { } ;
22
22
23
23
this . init ( ) ;
24
24
}
Original file line number Diff line number Diff line change @@ -73,6 +73,17 @@ <h1>Shapes Algorithm</h1>
73
73
const quantity = quantities [ i ] ;
74
74
const elm_quantity = document . createElement ( "li" ) ;
75
75
elm_quantity . innerHTML = `${ quantity . width } x${ quantity . height } = ${ quantity . quantity } (labeled ${ quantity . label } )` ;
76
+
77
+ const ul = document . createElement ( "ul" ) ;
78
+ for ( let position of quantity . positions ) {
79
+ console . log ( position ) ;
80
+ const ul_item = document . createElement ( "li" ) ;
81
+ ul_item . innerHTML = `(${ position . from_w } , ${ position . from_h } ) => (${ position . to_w } , ${ position . to_h } )` ;
82
+
83
+ ul . appendChild ( ul_item ) ;
84
+ }
85
+ elm_quantity . appendChild ( ul ) ;
86
+
76
87
elm_quantities . appendChild ( elm_quantity ) ;
77
88
}
78
89
} ) ;
You can’t perform that action at this time.
0 commit comments