forEach => for

This commit is contained in:
zhw2590582 committed 2022-01-07 22:11:48 +08:00
1 parent 99f5694100
commit 455e2189a7
18 files changed
+159 -103

No files matched your search

+3 -2
View File
@@ -93,13 +93,14 @@ export default function progress(options) {
}
}
option.highlight.forEach((item) => {
for (let index = 0; index < option.highlight.length; index++) {
const item = option.highlight[index];
const left = (clamp(item.time, 0, art.duration) / art.duration) * 100;
append(
$highlight,
`<span data-text="${item.text}" data-time="${item.time}" style="left: ${left}%"></span>`,
);
});
}
setBar('loaded', art.loaded);