Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added 2026/half_field-old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 2026/half_field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 9 additions & 8 deletions 2026/rebuilt_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ var config_data = `
"type": "clickable_image",
"filename": "2026/half_field.png",
"clickRestriction": "one",
"dimensions": "7 10",
"allowableResponses": "4 11 18 25 32 39 46 53 60 67",
"dimensions": "1 5",
"allowableResponses": "1 2 3 4 5",
"shape": "circle 5 black red true"
}
],
Expand All @@ -69,8 +69,8 @@ var config_data = `
"code": "asl",
"type": "clickable_image",
"filename": "2026/half_field.png",
"dimensions": "7 10",
"allowableResponses": "1 2 3 4 8 9 10 11 15 16 17 18 22 23 24 25 29 30 31 32 36 37 38 39 43 44 45 46 50 51 52 53 57 58 59 60 64 65 66 67",
"dimensions": "2 3",
"allowableResponses": "1 2 3 4 5 6",
"expectedMax": 5,
"shape": "circle 5 black red true"
},
Expand Down Expand Up @@ -116,8 +116,8 @@ var config_data = `
"code": "tsl",
"type": "clickable_image",
"filename": "2026/half_field.png",
"dimensions": "7 10",
"allowableResponses": "1 2 3 4 8 9 10 11 15 16 17 18 22 23 24 25 29 30 31 32 36 37 38 39 43 44 45 46 50 51 52 53 57 58 59 60 64 65 66 67",
"dimensions": "2 3",
"allowableResponses": "1 2 3 4 5 6",
"expectedMax": 25,
"shape": "circle 5 black red true"
},
Expand Down Expand Up @@ -182,7 +182,7 @@ var config_data = `
"10": "Level 1[break]",
"20": "Level 2[break]",
"30": "Level 3[break]",
"a": "Attempted[break]",
"f": "Failed[break]",
"x": "Not Attempted"
},
"defaultValue": "x"
Expand Down Expand Up @@ -234,7 +234,8 @@ var config_data = `
"code": "co",
"type": "text",
"size": 15,
"maxSize": 55
"maxSize": 200,
"rows": 5
}
]
}`;
6 changes: 5 additions & 1 deletion resources/css/scoutingPASS.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ html, body{
border-color: black;
}


.button {
font-family: Roboto;
font-size: 16px;
Expand Down Expand Up @@ -168,7 +169,10 @@ input[type="checkbox"] {
margin: 2vw;
}

.field-image-src{
.field-image-src {
width: 225px;
max-width: 500px;
height: auto;
background-position: center;
border: 1px solid;
}
Expand Down
33 changes: 27 additions & 6 deletions resources/js/scoutingPASS.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ function addClickableImage(table, idx, name, data) {
cell.setAttribute("colspan", 2);
cell.setAttribute("style", "text-align: center;");
var canvas = document.createElement('canvas');
canvas.width = 225;
canvas.height = 300;
//canvas.onclick = onFieldClick;
canvas.setAttribute("onclick", "onFieldClick(event)");
canvas.setAttribute("class", "field-image-src");
Expand Down Expand Up @@ -475,9 +477,21 @@ function addText(table, idx, name, data) {
cell1.setAttribute("title", data.tooltip);
}
cell2.classList.add("field");
var inp = document.createElement("input");
inp.setAttribute("id", "input_" + data.code);
inp.setAttribute("type", "text");
// var inp = document.createElement("input");
// inp.setAttribute("id", "input_" + data.code);
// inp.setAttribute("type", "text");

if (data.hasOwnProperty('rows')) {
var inp = document.createElement("textarea");
inp.setAttribute("id", "input_" + data.code);
inp.setAttribute("rows", data.rows);
inp.style.resize = "none";
} else {
var inp = document.createElement("input");
inp.setAttribute("id", "input_" + data.code);
inp.setAttribute("type", "text");
}

if (enableGoogleSheets && data.hasOwnProperty('gsCol')) {
inp.setAttribute("name", data.gsCol);
} else {
Expand Down Expand Up @@ -1083,7 +1097,7 @@ function clearForm() {
}
}
} else {
if (e.type == "number" || e.type == "text" || e.type == "hidden") {
if (e.type == "number" || e.type == "text" || e.type == "hidden" || e.tagName == "TEXTAREA") {
if ((e.classList.contains("counter")) ||
(e.classList.contains("timer")) ||
(e.classList.contains("cycle"))) {
Expand Down Expand Up @@ -1227,8 +1241,15 @@ function onFieldClick(event) {
}

//Turns coordinates into a numeric box
let box = ((Math.ceil(event.offsetY / target.height * resY) - 1) * resX) + Math.ceil(event.offsetX / target.width * resX);
let coords = event.offsetX + "," + event.offsetY;
// let box = ((Math.ceil(event.offsetY / target.height * resY) - 1) * resX) + Math.ceil(event.offsetX / target.width * resX);
// let coords = event.offsetX + "," + event.offsetY;

const scaleX = target.width / target.getBoundingClientRect().width;
const scaleY = target.height / target.getBoundingClientRect().height;
const adjustedX = event.offsetX * scaleX;
const adjustedY = event.offsetY * scaleY;
let box = ((Math.ceil(adjustedY / target.height * resY) - 1) * resX) + Math.ceil(adjustedX / target.width * resX);
let coords = adjustedX + "," + adjustedY;

let allowableResponses = document.getElementById("allowableResponses" + base).value;

Expand Down