fixes
This commit is contained in:
parent
90ea9df537
commit
e719102dec
3 changed files with 10 additions and 5 deletions
|
@ -4,7 +4,6 @@ import { fadein, fadeout, subCancel } from "../../utils.js";
|
|||
const call = async (stear, { find, resolve, render, call, event }, { text, autoFill = "" }) => {
|
||||
event.onloaded = () => {
|
||||
fadein(find.main, 200, true);
|
||||
console.log(find);
|
||||
find.input._.focus();
|
||||
}
|
||||
event.onresolve = async () => await fadeout(find.main);
|
||||
|
@ -56,6 +55,7 @@ const call = async (stear, { find, resolve, render, call, event }, { text, autoF
|
|||
border: "2px solid",
|
||||
borderRadius: "0.5rem",
|
||||
gridRow: "2",
|
||||
padding:"0.5rem"
|
||||
}
|
||||
}, autoFill),
|
||||
_({
|
||||
|
|
|
@ -70,7 +70,9 @@ const call = async (stear, { find, resolve, render, close, call, event }, { text
|
|||
class: "stear_status",
|
||||
style: {
|
||||
border: "2px solid " + next.color,
|
||||
backgroundColor: first ? "":"#555"
|
||||
backgroundColor: first ? "":"#555",
|
||||
userSelect:"none",
|
||||
cursor:"pointer"
|
||||
},
|
||||
event: { click: nextMsg }
|
||||
},next.text);
|
||||
|
|
7
main.js
7
main.js
|
@ -524,7 +524,10 @@ export class class_ {
|
|||
* @param {boolean} doBuild
|
||||
*/
|
||||
constructor(settings, childs, doBuild = true) {
|
||||
this.#elem = document.createElement(settings.type ?? "div");
|
||||
const type = settings.type ?? "div";
|
||||
if((["circle", "ellipse", "line", "path", "polygon", "polyline", "rect","svg" ]).includes(type))
|
||||
this.#elem = document.createElementNS("http://www.w3.org/2000/svg",type);
|
||||
else this.#elem = document.createElement(type);
|
||||
this.#childs = childs;
|
||||
var keys = Object.keys(settings);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
|
@ -662,7 +665,7 @@ export class class_ {
|
|||
}
|
||||
if (!needReplace && this.#elem.children[i] != out[i]) needReplace = true;
|
||||
}
|
||||
if (needReplace) this.#elem.replaceChildren(...out);
|
||||
if (needReplace||out.length==0) this.#elem.replaceChildren(...out);
|
||||
if (this.#dynamicState < 0) this.#dynamicState = -2;
|
||||
return this.#elem;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue