Spaces:
Running
Running
connect task to interface again
Browse files
index.js
CHANGED
|
@@ -38,6 +38,9 @@ async function getOutputs(task){
|
|
| 38 |
})
|
| 39 |
|
| 40 |
console.log(OUTPUT_LIST)
|
|
|
|
|
|
|
|
|
|
| 41 |
}
|
| 42 |
|
| 43 |
// await getOutputs(fillInTask()) // getOutputs will run in the interface to display results
|
|
@@ -77,13 +80,13 @@ new p5(function (p5){
|
|
| 77 |
let submitButton = p5.createButton("SUBMIT")
|
| 78 |
submitButton.size(170)
|
| 79 |
submitButton.class('submit')
|
| 80 |
-
submitButton.mousePressed(
|
| 81 |
}
|
| 82 |
|
| 83 |
-
function makeResultsText(){
|
| 84 |
-
let resultsText = p5.createElement('
|
| 85 |
let res = await getOutputs(fillInTask())
|
| 86 |
-
resultsText.html(str(res))
|
| 87 |
}
|
| 88 |
|
| 89 |
});
|
|
|
|
| 38 |
})
|
| 39 |
|
| 40 |
console.log(OUTPUT_LIST)
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
return await OUTPUT_LIST
|
| 44 |
}
|
| 45 |
|
| 46 |
// await getOutputs(fillInTask()) // getOutputs will run in the interface to display results
|
|
|
|
| 80 |
let submitButton = p5.createButton("SUBMIT")
|
| 81 |
submitButton.size(170)
|
| 82 |
submitButton.class('submit')
|
| 83 |
+
submitButton.mousePressed(makeResultsText)
|
| 84 |
}
|
| 85 |
|
| 86 |
+
async function makeResultsText(){
|
| 87 |
+
let resultsText = p5.createElement('h5',"Results:")
|
| 88 |
let res = await getOutputs(fillInTask())
|
| 89 |
+
resultsText.html(str(await res))
|
| 90 |
}
|
| 91 |
|
| 92 |
});
|