This commit is contained in:
zhw2590582 committed 2019-05-09 21:18:12 +08:00
1 parent 3f33e98421
commit 88067817cd
18 files changed
+35 -40

No files matched your search

@@ -151,13 +151,12 @@ export default class Danmuku {
});
this.queue
.filter(danmu => {
return (
.filter(
danmu =>
player.currentTime + 0.1 >= danmu.time &&
danmu.time >= player.currentTime - 0.1 &&
danmu.$state === 'wait'
);
})
danmu.$state === 'wait',
)
.forEach(danmu => {
danmu.$ref = getDanmuRef(this.queue);
this.$danmuku.appendChild(danmu.$ref);
@@ -78,9 +78,7 @@ export default function getDanmuTop(ins, danmu) {
const right = playerData.width - left - width;
return { top, left, height, width, right };
})
.sort((prev, next) => {
return prev.top - next.top;
});
.sort((prev, next) => prev.top - next.top);
if (danmus.length === 0) {
return marginTop;