mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 22:07:20 +08:00
1 parent
f05275c6b8
commit
86e4d7d6ae
2 files changed
+4
-39
No files matched your search
@@ -98,13 +98,12 @@ export class FontPicker {
|
||||
return terms.every(term => name.includes(term));
|
||||
});
|
||||
this.list.replaceChildren();
|
||||
for (const { font, index, group } of this.matches) {
|
||||
for (const { font, index } of this.matches) {
|
||||
const option = document.createElement("div");
|
||||
option.className = "font-option";
|
||||
option.id = `${this.list.id}-${index}`;
|
||||
option.dataset.index = String(index);
|
||||
option.setAttribute("data-disabled", String(Boolean(font.disabled)));
|
||||
option.setAttribute("data-current", String(!font.disabled && group.includes(Number(this.value))));
|
||||
const name = document.createElement("span");
|
||||
name.textContent = font.menuFamily || font.fullName || font.name;
|
||||
option.append(name);
|
||||
|
||||
Reference in new issue
Block a user