MCPcopy Create free account
hub / github.com/JKPotato-Computer/SignMaker / downloadSign

Function downloadSign

js/main.js:1163–1187  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1161 }
1162
1163 const downloadSign = async function() {
1164 const downloadPreview = document.getElementById("downloadPreview");
1165 const entirePost_option = document.getElementById("entirePost");
1166 const panelContainer = document.getElementById("panelContainer");
1167 const panelNumberSelector = document.getElementById("singularPanel");
1168
1169 let background = "";
1170
1171 if (entirePost_option.checked == true) {
1172 fileInfo.panel = -1;
1173 panelNumberSelector.style.display = "none";
1174 document.getElementById("downloadContents").style.verticalAlign = "10rem";
1175 } else {
1176 const panelNumber = document.getElementById("selectPanel");
1177 fileInfo.panel = (panelNumber.value - 1);
1178 panelNumberSelector.style.display = "block";
1179 document.getElementById("downloadContents").style.verticalAlign = "";
1180 }
1181
1182 if (fileInfo.fileType == "png") {
1183 saveToPng(getFile(),false);
1184 } else if (fileInfo.fileType == "svg") {
1185 saveToPng(getFile(),false,true);
1186 }
1187 }
1188
1189 const updatePreview = async function() {
1190 const downloadPreview = document.getElementById("downloadPreview");

Callers

nothing calls this directly

Calls 2

saveToPngFunction · 0.85
getFileFunction · 0.85

Tested by

no test coverage detected