mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 21:56:50 -04:00
Implement bracket audience display for double-elimination.
This commit is contained in:
@@ -31,7 +31,8 @@ const scoreMid = "135px";
|
||||
const scoreOut = "210px";
|
||||
const scoreFieldsOut = "40px";
|
||||
const scoreLogoTop = "-350px";
|
||||
const bracketLogoTop = "-600px";
|
||||
const bracketLogoTop = "-780px";
|
||||
const bracketLogoScale = 0.75;
|
||||
|
||||
// Handles a websocket message to change which screen is displayed.
|
||||
var handleAudienceDisplayMode = function(targetScreen) {
|
||||
@@ -142,6 +143,9 @@ var handleScorePosted = function(data) {
|
||||
$("#finalSeriesStatus").text(data.SeriesStatus);
|
||||
$("#finalSeriesStatus").attr("data-leader", data.SeriesLeader);
|
||||
$("#finalMatchName").text(data.MatchType + " " + data.Match.DisplayName);
|
||||
|
||||
// Reload the bracket to reflect any changes.
|
||||
$("#bracketSvg").attr("src", "/api/bracket/svg?v=" + new Date().getTime());
|
||||
};
|
||||
|
||||
// Handles a websocket message to play a sound to signal match start/stop/etc.
|
||||
@@ -292,7 +296,7 @@ var transitionBracketToLogo = function(callback) {
|
||||
$("#bracket").transition({queue: false, opacity: 0}, 500, "ease", function(){
|
||||
$("#bracket").hide();
|
||||
});
|
||||
$(".blindsCenter.full").transition({queue: false, top: 0}, 625, "ease", callback);
|
||||
$(".blindsCenter.full").transition({queue: false, top: 0, scale: 1}, 625, "ease", callback);
|
||||
};
|
||||
|
||||
var transitionBracketToLogoLuma = function(callback) {
|
||||
@@ -302,7 +306,7 @@ var transitionBracketToLogoLuma = function(callback) {
|
||||
};
|
||||
|
||||
var transitionBracketToScore = function(callback) {
|
||||
$(".blindsCenter.full").transition({queue: false, top: scoreLogoTop}, 1000, "ease");
|
||||
$(".blindsCenter.full").transition({queue: false, top: scoreLogoTop, scale: 1}, 1000, "ease");
|
||||
$("#bracket").transition({queue: false, opacity: 0}, 1000, "ease", function(){
|
||||
$("#bracket").hide();
|
||||
$("#finalScore").show();
|
||||
@@ -369,7 +373,7 @@ var transitionLogoToBlank = function(callback) {
|
||||
};
|
||||
|
||||
var transitionLogoToBracket = function(callback) {
|
||||
$(".blindsCenter.full").transition({queue: false, top: bracketLogoTop}, 625, "ease");
|
||||
$(".blindsCenter.full").transition({queue: false, top: bracketLogoTop, scale: bracketLogoScale}, 625, "ease");
|
||||
$("#bracket").show();
|
||||
$("#bracket").transition({queue: false, opacity: 1}, 1000, "ease", callback);
|
||||
};
|
||||
@@ -462,7 +466,7 @@ var transitionScoreToBlank = function(callback) {
|
||||
};
|
||||
|
||||
var transitionScoreToBracket = function(callback) {
|
||||
$(".blindsCenter.full").transition({queue: false, top: bracketLogoTop}, 1000, "ease");
|
||||
$(".blindsCenter.full").transition({queue: false, top: bracketLogoTop, scale: bracketLogoScale}, 1000, "ease");
|
||||
$("#finalScore").transition({queue: false, opacity: 0}, 1000, "ease", function(){
|
||||
$("#finalScore").hide();
|
||||
$("#bracket").show();
|
||||
|
||||
Reference in New Issue
Block a user