mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-10 14:16:47 -04:00
Decouple lower third from audience display mode so that it can be shown on top of other elements.
This commit is contained in:
@@ -155,20 +155,29 @@ var handleAllianceSelection = function(alliances) {
|
||||
|
||||
// Handles a websocket message to populate and/or show/hide a lower third.
|
||||
var handleLowerThird = function(data) {
|
||||
if (data === null) {
|
||||
return;
|
||||
if (data.LowerThird !== null) {
|
||||
if (data.LowerThird.BottomText === "") {
|
||||
$("#lowerThirdTop").hide();
|
||||
$("#lowerThirdBottom").hide();
|
||||
$("#lowerThirdSingle").text(data.LowerThird.TopText);
|
||||
$("#lowerThirdSingle").show();
|
||||
} else {
|
||||
$("#lowerThirdSingle").hide();
|
||||
$("#lowerThirdTop").text(data.LowerThird.TopText);
|
||||
$("#lowerThirdBottom").text(data.LowerThird.BottomText);
|
||||
$("#lowerThirdTop").show();
|
||||
$("#lowerThirdBottom").show();
|
||||
}
|
||||
}
|
||||
if (data.BottomText === "") {
|
||||
$("#lowerThirdTop").hide();
|
||||
$("#lowerThirdBottom").hide();
|
||||
$("#lowerThirdSingle").text(data.TopText);
|
||||
$("#lowerThirdSingle").show();
|
||||
} else {
|
||||
$("#lowerThirdSingle").hide();
|
||||
$("#lowerThirdTop").text(data.TopText);
|
||||
$("#lowerThirdBottom").text(data.BottomText);
|
||||
$("#lowerThirdTop").show();
|
||||
$("#lowerThirdBottom").show();
|
||||
|
||||
var lowerThirdElement = $("#lowerThird");
|
||||
if (data.ShowLowerThird && !lowerThirdElement.is(":visible")) {
|
||||
lowerThirdElement.show();
|
||||
lowerThirdElement.transition({queue: false, left: "150px"}, 750, "ease");
|
||||
} else if (!data.ShowLowerThird && lowerThirdElement.is(":visible")) {
|
||||
lowerThirdElement.transition({queue: false, left: "-1000px"}, 1000, "ease", function () {
|
||||
lowerThirdElement.hide();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -316,20 +325,6 @@ var transitionAllianceSelectionToBlank = function(callback) {
|
||||
$('#allianceSelectionCentering').transition({queue: false, right: "-60em"}, 500, "ease", callback);
|
||||
};
|
||||
|
||||
var transitionBlankToLowerThird = function(callback) {
|
||||
$("#lowerThird").show();
|
||||
$("#lowerThird").transition({queue: false, left: "150px"}, 750, "ease", callback);
|
||||
};
|
||||
|
||||
var transitionLowerThirdToBlank = function(callback) {
|
||||
$("#lowerThird").transition({queue: false, left: "-1000px"}, 1000, "ease", function() {
|
||||
$("#lowerThird").hide();
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var transitionBlankToSponsor = function(callback) {
|
||||
$(".blindsCenter.blank").css({rotateY: "90deg"});
|
||||
$(".blinds.right").transition({queue: false, right: 0}, 1000, "ease");
|
||||
@@ -547,7 +542,6 @@ $(function() {
|
||||
logo: transitionBlankToLogo,
|
||||
sponsor: transitionBlankToSponsor,
|
||||
allianceSelection: transitionBlankToAllianceSelection,
|
||||
lowerThird: transitionBlankToLowerThird,
|
||||
timeout: transitionBlankToTimeout
|
||||
},
|
||||
intro: {
|
||||
@@ -577,9 +571,6 @@ $(function() {
|
||||
allianceSelection: {
|
||||
blank: transitionAllianceSelectionToBlank
|
||||
},
|
||||
lowerThird: {
|
||||
blank: transitionLowerThirdToBlank
|
||||
},
|
||||
timeout: {
|
||||
blank: transitionTimeoutToBlank,
|
||||
intro: transitionTimeoutToIntro
|
||||
|
||||
Reference in New Issue
Block a user