diff --git a/src/App.js b/src/App.js index 3cc54f2..7ecf2d8 100644 --- a/src/App.js +++ b/src/App.js @@ -12,22 +12,22 @@ class App extends React.Component { this.openCanvas = this.openCanvas.bind(this); this.saveProof = this.saveProof.bind(this); this.introWindow = React.createRef(); - // this.state = { - // initialCSS: 'initial', - // canvasOpen: false, - // popupOpen: false, - // proof: { - // premises: [], - // conclusion: '', - // steps: [] - // } - // }; this.state = { initialCSS: 'initial', - canvasOpen: true, + canvasOpen: false, popupOpen: false, - proof: {premises: ["(({Q}))(({P}){Q})"], conclusion: "{Q}", steps:[] } + proof: { + premises: [], + conclusion: '', + steps: [] + } }; + // this.state = { + // initialCSS: 'initial', + // canvasOpen: true, + // popupOpen: false, + // proof: {premises: ["(({Q}))(({P}){Q})"], conclusion: "{Q}", steps:[] } + // }; } saveProof(proof) { diff --git a/src/canvas/Canvas.js b/src/canvas/Canvas.js index 112fd0d..a9b2311 100644 --- a/src/canvas/Canvas.js +++ b/src/canvas/Canvas.js @@ -113,7 +113,11 @@ class Canvas extends React.Component { if (currentStep+1 !== steps.length) { return } - this.setState({ highlights: selectable, interaction: false, cbFunction: this.state.functions[nameOfFunction] }); + this.setState({ + highlights: selectable, + interaction: false, + cbFunction: this.state.functions[nameOfFunction] + }); } /* @@ -201,7 +205,7 @@ class Canvas extends React.Component { // if a string, aka an ID if (typeof arr[a] === 'string') { // return the ID if found - if (arr[a] == id) { + if (arr[a] === id) { return id; } }