fix one more constructor build() dupe

This commit is contained in:
Robin Scholtes 2023-08-16 12:55:41 +12:00
parent 15252ee5c6
commit 047750fda4
4 changed files with 13 additions and 8 deletions

View file

@ -1 +1,4 @@
- UI tests
Observations:
- dragging an op to rec list will always drop it at the end of the list, even if you drag it 'between' items

View file

@ -1,4 +1,5 @@
import url from "url";
import Utils from "../../core/Utils.mjs";
/**
* c(ustom element)-operation-li ( list item )
@ -285,14 +286,16 @@ export class COperationLi extends HTMLElement {
let opName = "",
pos = 0;
this.charIndicesToHighlight.forEach(idxs => {
const [start, length] = idxs;
this.charIndicesToHighlight.forEach(charIndices => {
const [start, length] = charIndices;
if (typeof start !== "number") return;
opName += this.name.slice(pos, start) + "<strong>" +
opName +=
this.name.slice(pos, start) + "<strong>" +
this.name.slice(start, start + length) + "</strong>";
pos = start + length;
});
opName += this.name.slice(pos, this.name.length);
span.innerHTML = opName;
} else {
span.innerText = this.name;

View file

@ -110,7 +110,6 @@ class OperationsWaiter {
}
);
cOpList.build();
searchResultsEl.append(cOpList);
}
}

View file

@ -38,12 +38,12 @@ class RecipeWaiter {
// tweak these values for better user experiences per device type and UI
if (this.app.isMobileView()) {
swapThreshold = 0.60;
animation = 400;
swapThreshold = 0.30;
animation = 300;
delay = 50;
} else {
swapThreshold = 0.10;
animation = 200;
swapThreshold = 1;
animation = 100;
delay = 0;
}