Skip to content
This repository has been archived by the owner on Jul 5, 2022. It is now read-only.

Commit

Permalink
fix some bug on load
Browse files Browse the repository at this point in the history
  • Loading branch information
dewiweb committed Jun 23, 2020
1 parent 2f13357 commit e8b426b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mcxosc",
"version": "0.0.5-alpha",
"version": "0.0.6-alpha",
"description": "An Electron App as Bridge between Ember+ and OSC dedicated to MCx Lawo consoles/ based on https://github.com/nrkno/tv-automation-emberplus-connection",
"main": "main.js",
"scripts": {
Expand Down
11 changes: 5 additions & 6 deletions renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ ipcRenderer.on('sendFilename', function(event,filename){

ipcRenderer.on('sendFileContent', function(event, content){
var table = document.getElementById("tableOfConnection");
for (var i = 2; i<table.rows.length; i++){
table.deleteRow(i)
}
deleteAllRows();
var sendedJSON = JSON.parse(content);
var sendedJSON = sendedJSON.replace(/\\n/g,"");
var sendedJSON = JSON.parse(sendedJSON);
Expand Down Expand Up @@ -159,7 +157,7 @@ function addGenBtns (){
var btnDeleteAll = document.createElement("BUTTON");
btnDeleteAll.innerHTML = "Delete All"
btnDeleteAll.setAttribute('onClick','deleteAllRows(this)'); //function not created yet
btnSuscribeAll.innerHTML = "Go All!"
btnSuscribeAll.innerHTML = "Connect All!"
btnSuscribeAll.setAttribute('onClick','sendAllConnections(this)');
table.rows[1].cells[5].appendChild(btnSuscribeAll);
table.rows[1].cells[5].appendChild(btnDeleteAll);
Expand Down Expand Up @@ -304,7 +302,8 @@ function submitEmberPath (event){
cell9.style.fontSize ='x-small';
cell11.style.fontSize ='x-small';
if (table.rows.length == 3){
addGenBtns();
if(table.rows[1].cells[5].innerHTML == ""){ addGenBtns();
}
};
event.preventDefault();

Expand Down Expand Up @@ -540,7 +539,7 @@ function sendAllConnections(o){
for (let i = 2; i<table.rows.length; i++){
setTimeout(() => {
sendConnection(i);
}, i*10);
}, i*25);
}
}

Expand Down

0 comments on commit e8b426b

Please sign in to comment.