Update app.js for new resistor img position

pull/2757/head
stweedo 2023-05-18 11:49:06 -05:00 committed by GitHub
parent 0c2244eb5a
commit 114b8c7f63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -134,7 +134,7 @@ function drawResistor(colorBands, tolerance) {
var numcolorBands = bandColors.length;
var resistorStartY = ((g.getHeight() - resistorBodyHeight) / 2) + 48;
clearScreen();
g.drawImage(img, 0, 48);
g.drawImage(img, 0, 112);
var bandWidth = (resistorBodyWidth - (numcolorBands * 2 - 1)) / numcolorBands; // width of each band, accounting for the spacing
var bandHeight = resistorBodyHeight; // height of each band
var currentX = resistorStartX; // starting point for the first band
@ -508,4 +508,4 @@ function drawResistance(resistance, tolerance) {
},
};
E.showMenu(mainMenu);
})(load);
})();