fixing broken code · pythonpeixun/AlgorithmVisualizer@d8755f0 · GitHub
Skip to content

Commit d8755f0

Browse files
author
Kevin Nadro
committed
fixing broken code
- working prototype - need to fix the vertical split bar to have the divider between workspace and sandbox container work together
1 parent 34fb410 commit d8755f0

4 files changed

Lines changed: 45 additions & 26 deletions

File tree

css/stylesheet.css

Lines changed: 26 additions & 5 deletions

index.html

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,29 +128,30 @@ <h3>
128128
</section>
129129
</div>
130130
<div class="sandbox_container hide">
131-
<div>
132-
<div class="inputContainer">
131+
132+
<div class="auto-gen auto-gen-tracers">
133+
<button class='sb-button' id="button-2DMatrix">Create 2DMatrix</button>
134+
135+
</div>
136+
137+
<div class="auto-gen auto-gen-options">
133138
<div>
134-
# of Rows:
135-
<input class="inputs"id="numRows" type="number" value="5">
139+
# of Rows: <input class="inputs"id="numRows" type="number" value="5">
136140
</div>
137141

138142
<div>
139-
# of Columns:
140-
<input class="inputs"id="numColumns" type="number" value="5">
143+
# of Columns: <input class="inputs"id="numColumns" type="number" value="5">
141144
</div>
142145

143146
<div>
144-
Tracer Name:
145-
<input class="inputs"id="tracerName" type="text" value="default">
147+
Tracer Name: <input class="inputs"id="tracerName" type="text" value="default">
146148
</div>
147149
</div>
148150

149-
<div>
150-
<button class='sb-button' id="button-2DMatrix">Create 2DMatrix</button>
151+
<div class="auto-gen auto-gen-generate">
151152
<button class='sb-button' id="button-generateJS">Generate Javascript</button>
152153
</div>
153-
</div>
154+
154155
</div>
155156
<div class="editor_container">
156157
<section class="files_bar">

js/create/array2d.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,14 @@ const getNumColumns = () => {
1414
}
1515

1616
const fauxData = (r, c) => {
17-
var arr = new Array(r);
18-
for (var i = 0; i < c; i++) {
19-
arr[i] = new Array(c);
20-
}
21-
17+
var D = [];
2218
for (var i = 0; i < r; i++) {
23-
for(var j = 0; j < c; j++){
24-
arr[i][j] = 0;
25-
}
19+
D.push([]);
20+
for (var j = 0; j < c; j++) {
21+
D[i].push(Math.floor(Math.random()* 10 + 1));
22+
}
2623
}
27-
return arr;
24+
return D;
2825
}
2926

3027
const tableToInputFields = () => {

js/create/index.js

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)