This commit is contained in:
Harvey Zack committed 2022-05-01 15:02:30 +08:00
1 parent 3761ff4979
commit 99dce8c673
3 files changed
+5 -5

No files matched your search

@@ -257,7 +257,7 @@ class Danmuku {
}
getRef() {
const result = this.queue.find((danmu)=>{
return danmu.$ref && danmu.$state === 'wait';
return danmu.$ref && (danmu.$state === 'wait' || danmu.$state === 'ready');
});
if (result) {
const { $ref } = result;
@@ -382,7 +382,7 @@ class Danmuku {
});
this.queue.filter((danmu)=>this.getReady(danmu)
).forEach((danmu)=>{
danmu.$ref = danmu.$ref || this.getRef();
danmu.$ref = this.getRef();
danmu.$ref.innerText = danmu.text;
this.$danmuku.appendChild(danmu.$ref);
danmu.$ref.style.opacity = this.option.opacity;