Skip to content

Commit

Permalink
Add border option to danmaku param
Browse files Browse the repository at this point in the history
  • Loading branch information
Oukanina committed Jun 30, 2017
1 parent 6679214 commit 9b3c198
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/DPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ class DPlayer {
this.danIndex = this.dan.length;
}
if (!this.paused) {
this.setTime('danmaku');
this.setTime('danmaku');
}
}
}
Expand Down Expand Up @@ -536,10 +536,10 @@ class DPlayer {
const danmaku = {
text: htmlEncode(danmakuData.text),
color: danmakuData.color,
type: danmakuData.type
type: danmakuData.type,
border: `2px solid ${this.option.theme}`
};
const item = this.pushDanmaku(danmaku);
item.style.border = `2px solid ${this.option.theme}`;
this.pushDanmaku(danmaku);
};

const closeCommentSetting = () => {
Expand Down Expand Up @@ -1004,6 +1004,7 @@ class DPlayer {
item.innerHTML = danmaku[i].text;
item.style.opacity = this.danOpacity;
item.style.color = danmaku[i].color;
item.style.border = danmaku[i].border;
item.addEventListener('animationend', () => {
danContainer.removeChild(item);
});
Expand Down

0 comments on commit 9b3c198

Please sign in to comment.