提交 650a6cd7 编写于 作者: K Kevin Nadro

fixing positions of the modules when creating

上级 df963a0a
......@@ -46,6 +46,29 @@ const makeInputFields = () =>{
};
const generateJS = () =>{
var logger = new modules.LogTracer('Generated Javascript');
};
const positionModules = () =>{
var elems = document.getElementsByClassName('module_wrapper');
if(elems <= 0) return;
var n = elems.length;
var spacing = (100/n);
for (var i = 0; i < n; i++) {
if( i === 0){
elems[i].style.bottom = (spacing * (n-1)) + '%';
}else if(i === n - 1){
elems[i].style.top = (spacing * i) + '%';
}else{
elems[i].style.top = (spacing * i) + '%';
elems[i].style.bottom = (spacing * i) + '%';
}
}
}
const setupButtons = () => {
var button_2DMatrix = document.getElementById("button-2DMatrix");
......@@ -57,7 +80,9 @@ const setupButtons = () => {
arr2DTracer.setData(data);
makeInputFields();
generateJS();
},false);
};
module.exports = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册