Switch standalone bracket display to highlight current match without connectors, rather than saved match with connectors.

This commit is contained in:
Patrick Fairbank
2022-09-29 18:58:47 -07:00
parent 9914768c1d
commit 1165e71503
6 changed files with 163 additions and 158 deletions

View File

@@ -170,7 +170,7 @@ var handleScorePosted = function(data) {
$("#finalMatchName").text(data.MatchType + " " + data.Match.DisplayName);
// Reload the bracket to reflect any changes.
$("#bracketSvg").attr("src", "/api/bracket/svg?v=" + new Date().getTime());
$("#bracketSvg").attr("src", "/api/bracket/svg?activeMatch=saved&v=" + new Date().getTime());
};
// Handles a websocket message to play a sound to signal match start/stop/etc.

View File

@@ -5,14 +5,14 @@
var websocket;
// Handles a websocket message to populate the final score data, which also triggers a bracket update.
const handleScorePosted = function(data) {
$("#bracketSvg").attr("src", "/api/bracket/svg?v=" + new Date().getTime());
// Handles a websocket message to load a new match.
const handleMatchLoad = function(data) {
$("#bracketSvg").attr("src", "/api/bracket/svg?activeMatch=current&v=" + new Date().getTime());
};
$(function() {
// Set up the websocket back to the server.
websocket = new CheesyWebsocket("/displays/bracket/websocket", {
scorePosted: function(event) { handleScorePosted(event.data); },
matchLoad: function(event) { handleMatchLoad(event.data); },
});
});