Revert to current dev branch behaviour somewhat

This commit is contained in:
hppeng 2022-06-23 03:16:36 -07:00
parent 8945261c31
commit 12e4c1e88c
3 changed files with 5 additions and 6 deletions

View file

@ -293,7 +293,7 @@ function init_autocomplete() {
resultsList: {
maxResults: 1000,
tabSelect: true,
noResults: true,
noResults: false,
class: "search-box dark-7 rounded-bottom px-2 fw-bold dark-shadow-sm",
element: (list, data) => {
// dynamic result loc

View file

@ -894,7 +894,6 @@ class SkillPointSetterNode extends ComputeNode {
}
compute_func(input_map) {
console.log("a");
if (input_map.size !== 1) { throw "SkillPointSetterNode accepts exactly one input (build)"; }
const [build] = input_map.values(); // Extract values, pattern match it into size one list and bind to first element
for (const [idx, elem] of skp_order.entries()) {

View file

@ -105,7 +105,7 @@ class ComputeNode {
*
* @param node : ComputeNode to schedule an update for.
*/
function calcSchedule(node) {
function calcSchedule(node, timeout) {
if (node.update_task !== null) {
clearTimeout(node.update_task);
}
@ -113,7 +113,7 @@ function calcSchedule(node) {
node.update_task = setTimeout(function() {
node.update();
node.update_task = null;
}, 500);
}, timeout);
}
class PrintNode extends ComputeNode {
@ -139,8 +139,8 @@ class InputNode extends ComputeNode {
constructor(name, input_field) {
super(name);
this.input_field = input_field;
//this.input_field.addEventListener("input", () => calcSchedule(this));
this.input_field.addEventListener("change", () => calcSchedule(this));
this.input_field.addEventListener("input", () => calcSchedule(this, 5000));
this.input_field.addEventListener("change", () => calcSchedule(this, 500));
//calcSchedule(this); Manually fire first update for better control
}