Ugoira play/pause button hide fix

Arrow functions don't allow the use of "this" (ends up returning the window object) so the buttons are failing to hide themselves.
This commit is contained in:
Moebius-Strip
2018-08-05 14:20:36 -04:00
committed by GitHub
parent d813f41aad
commit 1a79443fe8

View File

@@ -30,7 +30,7 @@ Ugoira.create_player = (mime_type, frames, file_url) => {
$("#ugoira-play").click(e => {
Ugoira.player.play();
$(this).hide();
$("#ugoira-play").hide();
$("#ugoira-pause").show();
Ugoira.player_manually_paused = false;
e.preventDefault();
@@ -38,7 +38,7 @@ Ugoira.create_player = (mime_type, frames, file_url) => {
$("#ugoira-pause").click(e => {
Ugoira.player.pause();
$(this).hide();
$("#ugoira-pause").hide();
$("#ugoira-play").show();
Ugoira.player_manually_paused = true;
e.preventDefault();