diff --git a/index.html b/index.html index 0fcb000..08672c0 100644 --- a/index.html +++ b/index.html @@ -215,9 +215,11 @@ - + - + + + diff --git a/js/components/state.js b/js/components/state.js index b41a4ab..d31b5c0 100644 --- a/js/components/state.js +++ b/js/components/state.js @@ -6,7 +6,7 @@ class State { this.y = y; this.mouseOffsetX = 0; this.mouseOffsetY = 0; - this.color = '#f0f'; + this.color = '#fff'; this.isActive = false; this.activeTime = 0; this.isAcceptState = false; diff --git a/js/export/export.js b/js/export/export.js index caad25b..d527472 100644 --- a/js/export/export.js +++ b/js/export/export.js @@ -58,6 +58,7 @@ function parseFromJson(json) { doc.states = doc.states.map(state => Object.assign(new State(0, 0), state)); doc.connections = doc.connections.map(connection => { + console.log(connection.type); switch(connection.type) { case 'Connection': connection = Object.assign(new Connection(null, null), connection); @@ -73,9 +74,10 @@ function parseFromJson(json) { break; case 'StartConnection': - connection = Object.assign(new StartConnection(null, {x: 0, y: 0}), connection); + connection = Object.assign(new StartConnection(), connection); connection.state = doc.states.find(state => state.id === connection.state); + console.log(connection.state); break; } diff --git a/js/menu.js b/js/menu.js index eb6b559..48c493b 100644 --- a/js/menu.js +++ b/js/menu.js @@ -86,6 +86,16 @@ modalImport.addFooterBtn('Laden', 'btn', () => { } }); +const modalSimulate = new tingle.modal({ + footer: true, +}); +modalSimulate.setContent('