[ts] Changed pause/play button.

This commit is contained in:
NathanSweet 2016-09-07 22:48:30 +02:00
parent aba57b2ad2
commit 1fafe6bd40
4 changed files with 12 additions and 24 deletions

View File

@ -46,13 +46,10 @@ var imageChangesDemo = function(loadingComplete, bgColor) {
playButton = $("#imagechanges-playbutton");
var playButtonUpdate = function () {
isPlaying = !isPlaying;
if (isPlaying) {
playButton.val("Pause");
playButton.addClass("pause").removeClass("play");
} else {
playButton.val("Play");
if (isPlaying)
playButton.addClass("pause").removeClass("play");
else
playButton.addClass("play").removeClass("pause");
}
}
playButton.click(playButtonUpdate);
playButton.addClass("pause");

View File

@ -46,13 +46,10 @@ var meshesDemo = function(loadingComplete, bgColor) {
playButton = $("#meshes-playbutton");
var playButtonUpdate = function () {
isPlaying = !isPlaying;
if (isPlaying) {
playButton.val("Pause");
playButton.addClass("pause").removeClass("play");
} else {
playButton.val("Play");
if (isPlaying)
playButton.addClass("pause").removeClass("play");
else
playButton.addClass("play").removeClass("pause");
}
}
playButton.click(playButtonUpdate);
playButton.addClass("pause");

View File

@ -62,13 +62,10 @@ var tankDemo = function(loadingComplete, bgColor) {
playButton = $("#tank-playbutton");
var playButtonUpdate = function () {
isPlaying = !isPlaying;
if (isPlaying) {
playButton.val("Pause");
playButton.addClass("pause").removeClass("play");
} else {
playButton.val("Play");
if (isPlaying)
playButton.addClass("pause").removeClass("play");
else
playButton.addClass("play").removeClass("pause");
}
}
playButton.click(playButtonUpdate);
playButton.addClass("pause");

View File

@ -75,13 +75,10 @@ var vineDemo = function(loadingComplete, bgColor) {
playButton = $("#vine-playbutton");
var playButtonUpdate = function () {
isPlaying = !isPlaying;
if (isPlaying) {
playButton.val("Pause");
playButton.addClass("pause").removeClass("play");
} else {
playButton.val("Play");
if (isPlaying)
playButton.addClass("pause").removeClass("play");
else
playButton.addClass("play").removeClass("pause");
}
}
playButton.click(playButtonUpdate);
playButton.addClass("pause");