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

Function onTempImageLoad

js/main.js:1144–1155  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

1142 // let targetImg = new Image();
1143
1144 function onTempImageLoad(e) {
1145 tmpCanvas.width = e.target.width;
1146 tmpCanvas.height = e.target.height;
1147
1148 ctx.drawImage(e.target, 0, 0);
1149 if (isPreview) {
1150 resolve(tmpCanvas.toDataURL());
1151 } else {
1152 downloadFile(tmpCanvas.toDataURL(),".png");
1153 resolve(true);
1154 }
1155 };
1156
1157 }).catch(function(error) {
1158 console.error("Error Saving!", error);

Callers

nothing calls this directly

Calls 1

downloadFileFunction · 0.85

Tested by

no test coverage detected