mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-07 15:07:11 -04:00
fix one more constructor build() dupe
This commit is contained in:
parent
15252ee5c6
commit
047750fda4
4 changed files with 13 additions and 8 deletions
|
@ -1 +1,4 @@
|
||||||
- UI tests
|
- 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
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import url from "url";
|
import url from "url";
|
||||||
|
import Utils from "../../core/Utils.mjs";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* c(ustom element)-operation-li ( list item )
|
* c(ustom element)-operation-li ( list item )
|
||||||
|
@ -285,14 +286,16 @@ export class COperationLi extends HTMLElement {
|
||||||
let opName = "",
|
let opName = "",
|
||||||
pos = 0;
|
pos = 0;
|
||||||
|
|
||||||
this.charIndicesToHighlight.forEach(idxs => {
|
this.charIndicesToHighlight.forEach(charIndices => {
|
||||||
const [start, length] = idxs;
|
const [start, length] = charIndices;
|
||||||
if (typeof start !== "number") return;
|
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>";
|
this.name.slice(start, start + length) + "</strong>";
|
||||||
pos = start + length;
|
pos = start + length;
|
||||||
});
|
});
|
||||||
opName += this.name.slice(pos, this.name.length);
|
opName += this.name.slice(pos, this.name.length);
|
||||||
|
|
||||||
span.innerHTML = opName;
|
span.innerHTML = opName;
|
||||||
} else {
|
} else {
|
||||||
span.innerText = this.name;
|
span.innerText = this.name;
|
||||||
|
|
|
@ -110,7 +110,6 @@ class OperationsWaiter {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
cOpList.build();
|
|
||||||
searchResultsEl.append(cOpList);
|
searchResultsEl.append(cOpList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,12 +38,12 @@ class RecipeWaiter {
|
||||||
|
|
||||||
// tweak these values for better user experiences per device type and UI
|
// tweak these values for better user experiences per device type and UI
|
||||||
if (this.app.isMobileView()) {
|
if (this.app.isMobileView()) {
|
||||||
swapThreshold = 0.60;
|
swapThreshold = 0.30;
|
||||||
animation = 400;
|
animation = 300;
|
||||||
delay = 50;
|
delay = 50;
|
||||||
} else {
|
} else {
|
||||||
swapThreshold = 0.10;
|
swapThreshold = 1;
|
||||||
animation = 200;
|
animation = 100;
|
||||||
delay = 0;
|
delay = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue