提交 3b2ec688 编写于 作者: K Kevin Nadro

generating code progress

上级 650a6cd7
......@@ -30,8 +30,8 @@ const makeInputFields = () =>{
var table = document.querySelector('.mtbl-table');
var numRows = getNumRows();
var numColumns = getNumColumns();
var numRows = table.childNodes.length;
var numColumns = table.childNodes[0].childNodes.length;
for(var i = 0; i < numRows; i++){
for(var j = 0; j < numColumns; j++){
......@@ -48,6 +48,20 @@ const makeInputFields = () =>{
const generateJS = () =>{
var logger = new modules.LogTracer('Generated Javascript');
var table = document.querySelector('.mtbl-table');
var numRows = table.childNodes.length;
var numColumns = table.childNodes[0].childNodes.length;
var line = '';
for(var i = 0; i < numRows; i++){
line = '';
for(var j = 0; j < numColumns; j++){
line += table.childNodes[i].childNodes[j].childNodes[0].value + ',';
}
logger.print(line);
}
};
const positionModules = () =>{
......@@ -81,6 +95,7 @@ const setupButtons = () => {
arr2DTracer.setData(data);
makeInputFields();
generateJS();
positionModules();
},false);
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册