Spaces:
Running
Running
sarahciston
commited on
Commit
•
aa87ec6
1
Parent(s):
ce66456
disconnect task from interface, check button click
Browse files
index.js
CHANGED
@@ -42,7 +42,7 @@ async function getOutputs(task){
|
|
42 |
return await OUTPUT_LIST
|
43 |
}
|
44 |
|
45 |
-
|
46 |
|
47 |
|
48 |
|
@@ -75,18 +75,20 @@ new p5(function (p5){
|
|
75 |
PROMPT_INPUT.addClass("prompt")
|
76 |
}
|
77 |
|
78 |
-
|
79 |
let submitButton = p5.createButton("SUBMIT")
|
80 |
submitButton.size(170)
|
81 |
submitButton.class('submit')
|
82 |
-
submitButton.mousePressed(
|
83 |
}
|
84 |
|
85 |
-
// async
|
86 |
-
|
87 |
-
|
88 |
-
|
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 |
|