sarahciston commited on
Commit
aa87ec6
1 Parent(s): ce66456

disconnect task from interface, check button click

Browse files
Files changed (1) hide show
  1. index.js +10 -8
index.js CHANGED
@@ -42,7 +42,7 @@ async function getOutputs(task){
42
  return await OUTPUT_LIST
43
  }
44
 
45
- // await getOutputs(fillInTask()) // getOutputs will run in the interface to display results
46
 
47
 
48
 
@@ -75,18 +75,20 @@ new p5(function (p5){
75
  PROMPT_INPUT.addClass("prompt")
76
  }
77
 
78
- async function makeButtons(){
79
  let submitButton = p5.createButton("SUBMIT")
80
  submitButton.size(170)
81
  submitButton.class('submit')
82
- submitButton.mousePressed(await getOutputs(fillInTask()))
83
  }
84
 
85
- // async function makeResultsText(){
86
- // let resultsText = p5.createElement('h5',"Results:")
87
- // let res = await getOutputs(fillInTask())
88
- // resultsText.html(str(await res))
89
- // }
 
 
90
 
91
  });
92
 
 
42
  return await OUTPUT_LIST
43
  }
44
 
45
+ await getOutputs(fillInTask()) // getOutputs will later connect to the interface to display results
46
 
47
 
48
 
 
75
  PROMPT_INPUT.addClass("prompt")
76
  }
77
 
78
+ function makeButtons(){
79
  let submitButton = p5.createButton("SUBMIT")
80
  submitButton.size(170)
81
  submitButton.class('submit')
82
+ submitButton.mousePressed(makeResultsText)
83
  }
84
 
85
+ // async
86
+ function makeResultsText(){
87
+ console.log('button pressed')
88
+ // let resultsText = p5.createElement('h5',"Results:")
89
+ // let res = await getOutputs(fillInTask())
90
+ // resultsText.html(str(res))
91
+ }
92
 
93
  });
94