|
2 | 2 |
|
3 | 3 | const modules = require('../module');
|
4 | 4 | const array2d = require('./array2d');
|
| 5 | +const array1d = require('./array1d'); |
5 | 6 | const util = require('./util');
|
6 | 7 | const Server = require('../server');
|
7 | 8 | const DOM = require('../dom');
|
@@ -32,43 +33,58 @@ const reloadAlgorithm = () => {
|
32 | 33 | });
|
33 | 34 | };
|
34 | 35 |
|
35 |
| - |
| 36 | +const createHTML = () => { |
| 37 | + $('.workspace').append("<div class='sandbox_container'>\ |
| 38 | + <section class='close_bar'>\ |
| 39 | + <div class='btn' id='btn_close'>\ |
| 40 | + <div class='wrapper'>\ |
| 41 | + <i class='fa fa-times' aria-hidden='true'></i>\ |
| 42 | + </div>\ |
| 43 | + </div>\ |
| 44 | + </section>\ |
| 45 | + <section class='auto-gen'>\ |
| 46 | + <div class='grid' id='array1D-gen'>\ |
| 47 | + <div> array1DTracer </div>\ |
| 48 | + <i class='fa fa-ellipsis-h fa-5x' aria-hidden='true'></i>\ |
| 49 | + <div class='fields'>\ |
| 50 | + # of Columns: <input class='inputs'id='numColumns-1D' type='number' value='5'>\ |
| 51 | + </div>\ |
| 52 | + <div class='fields'>\ |
| 53 | + Tracer Name: <input class='inputs'id='tracerName-1D' type='text' value='default'>\ |
| 54 | + </div>\ |
| 55 | + <button class='sb-button' id='button-1DMatrix'>Create 1DMatrix</button>\ |
| 56 | + <button class='sb-button' id='button-generateJS-1D'>Generate Javascript</button>\ |
| 57 | + </div>\ |
| 58 | + <div class='grid' id='array2D-gen'>\ |
| 59 | + <div> array2DTracer </div>\ |
| 60 | + <i class='fa fa-th fa-5x' aria-hidden='true'></i>\ |
| 61 | + <div class='fields'>\ |
| 62 | + # of Rows: <input class='inputs'id='numRows-2D' type='number' value='5'>\ |
| 63 | + </div>\ |
| 64 | + <div class='fields'>\ |
| 65 | + # of Columns: <input class='inputs'id='numColumns-2D' type='number' value='5'>\ |
| 66 | + </div>\ |
| 67 | + <div class='fields'>\ |
| 68 | + Tracer Name: <input class='inputs'id='tracerName-2D' type='text' value='default'>\ |
| 69 | + </div>\ |
| 70 | + <button class='sb-button' id='button-2DMatrix'>Create 2DMatrix</button>\ |
| 71 | + <button class='sb-button' id='button-generateJS-2D'>Generate Javascript</button>\ |
| 72 | + </div>\ |
| 73 | + <div class='grid' id='chart-gen'></div>\ |
| 74 | + <div class='grid' id='graph-gen'></div>\ |
| 75 | + </section>\ |
| 76 | + </div>"); |
| 77 | +}; |
36 | 78 |
|
37 | 79 | const init = () => {
|
38 | 80 |
|
39 | 81 | var check = $('.sandbox_container');
|
40 | 82 | if(!check.length){
|
41 | 83 | util.clearModules();
|
42 |
| - |
43 |
| - $('.workspace').append("<div class='sandbox_container'>\ |
44 |
| - <section class='close_bar'>\ |
45 |
| - <div class='btn' id='btn_close'>\ |
46 |
| - <div class='wrapper'>\ |
47 |
| - <i class='fa fa-times' aria-hidden='true'></i>\ |
48 |
| - </div>\ |
49 |
| - </div>\ |
50 |
| - </section>\ |
51 |
| - <section class='auto-gen auto-gen-tracers'>\ |
52 |
| - <button class='sb-button' id='button-2DMatrix'>Create 2DMatrix</button>\ |
53 |
| - </section>\ |
54 |
| - <section class='auto-gen auto-gen-options'>\ |
55 |
| - <div>\ |
56 |
| - # of Rows: <input class='inputs'id='numRows' type='number' value='5'>\ |
57 |
| - </div>\ |
58 |
| - <div>\ |
59 |
| - # of Columns: <input class='inputs'id='numColumns' type='number' value='5'>\ |
60 |
| - </div>\ |
61 |
| - <div>\ |
62 |
| - Tracer Name: <input class='inputs'id='tracerName' type='text' value='default'>\ |
63 |
| - </div>\ |
64 |
| - </section>\ |
65 |
| - <section class='auto-gen auto-gen-generate'>\ |
66 |
| - <button class='sb-button' id='button-generateJS'>Generate Javascript</button>\ |
67 |
| - </section>\ |
68 |
| - </div>"); |
| 84 | + createHTML(); |
69 | 85 | array2d.setup();
|
70 |
| - |
71 |
| - closeCreate(moduleWrappers); |
| 86 | + array1d.setup(); |
| 87 | + closeCreate(); |
72 | 88 | }
|
73 | 89 | };
|
74 | 90 |
|
|
0 commit comments