Skip to content

Commit

Permalink
Merge pull request DIYgod#361 from sdvcrx/master
Browse files Browse the repository at this point in the history
 Fix scss build error and es5 compatibility
  • Loading branch information
DIYgod authored Aug 24, 2018
2 parents 9f4cfe3 + 852dae5 commit 0f3bd57
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ node_js:
cache:
yarn: true
directories:
- node_modules
- node_modules

script:
yarn run build
2 changes: 1 addition & 1 deletion src/css/controller.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}
&~.dplayer-bar-preview {
opacity: 0;
},
}
&~.dplayer-bar-time {
opacity: 0;
}
Expand Down
5 changes: 2 additions & 3 deletions src/js/contextmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ class ContextMenu {
constructor (player) {
this.player = player;

[...this.player.template.menuItem].map((item, index) => {
Array.prototype.slice.call(this.player.template.menuItem).forEach((item, index) => {
if (this.player.options.contextmenu[index].click) {
item.addEventListener('click', () => {
this.player.options.contextmenu[index].click(this.player);
this.hide();
});
}
return item;
});

this.player.container.addEventListener('contextmenu', (e) => {
Expand Down Expand Up @@ -59,4 +58,4 @@ class ContextMenu {
}
}

export default ContextMenu;
export default ContextMenu;

0 comments on commit 0f3bd57

Please sign in to comment.