Skip to content

Commit

Permalink
Don't apply override for sections
Browse files Browse the repository at this point in the history
  • Loading branch information
tmalahie committed Jul 29, 2024
1 parent 405b7f3 commit d0afb16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion php/includes/mk/map.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$circuitMainData = $circuitPayload->main;
echo '{';
printCircuitPart($circuit, 0,$circuitPayload);
if (isset($circuitPayload->lapOverrides)) {
if (isset($circuitPayload->lapOverrides) && !isset($circuitMainData->sections)) {
echo ',"lapOverrides":{';
$v = '';
foreach ($circuitPayload->lapOverrides as $lapKey => $lapData) {
Expand Down
5 changes: 5 additions & 0 deletions scripts/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3415,6 +3415,10 @@ function applyColorSelector() {
document.getElementById("button-bgcolor").style.backgroundColor = "rgb("+bgColor.r+","+bgColor.g+","+bgColor.b+")";
document.body.style.backgroundColor = "rgb("+bgColor.r+","+bgColor.g+","+bgColor.b+")";
}
function initOverrideSelector() {
var editorTool = editorTools.checkpoints;
document.getElementById("lapoverride-opener").style.display = editorTool && !editorTool.data.type ? "block":"none";
}
function showMusicSelector() {
var $music = document.getElementById("music-selector");
document.body.removeChild($music);
Expand Down Expand Up @@ -6098,6 +6102,7 @@ var commonTools = {
applyMusicSelector();
document.body.classList.add("setting-preview");
applyColorSelector();
initOverrideSelector();
},
"click" : function() {
},
Expand Down

0 comments on commit d0afb16

Please sign in to comment.