From 987fc4d0334827abe3f7bb40b14758441e9f1ed0 Mon Sep 17 00:00:00 2001 From: stweedo <108593831+stweedo@users.noreply.github.com> Date: Thu, 18 May 2023 12:33:13 -0500 Subject: [PATCH] Update app.js - Adjust positioning of bands for new resistor img --- apps/rescalc/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/rescalc/app.js b/apps/rescalc/app.js index 4d5465604..cfb88e015 100644 --- a/apps/rescalc/app.js +++ b/apps/rescalc/app.js @@ -129,7 +129,7 @@ function drawResistor(colorBands, tolerance) { let img = require("Storage").read("rescalc-resistor.img"); let resistorBodyWidth = 51; let resistorBodyHeight = 43; - let resistorStartX = 57; + let resistorStartX = 52; var bandColors = colorBands; var numcolorBands = bandColors.length; var resistorStartY = ((g.getHeight() - resistorBodyHeight) / 2) + 48; @@ -156,9 +156,9 @@ function drawResistor(colorBands, tolerance) { g.drawLine(bandX, bandY, bandX, bandY + bandHeight); // left outline g.drawLine(bandX + bandWidth, bandY, bandX + bandWidth, bandY + bandHeight); // right outline - // if it's the fourth band, shift it over by an additional 8 pixels + // if it's the fourth band, shift it over by an additional 12 pixels if (i === 2) { - currentX = bandX + bandWidth + 5 + 8; // update the current X position for the next band, accounting for the spacing + currentX = bandX + bandWidth + 5 + 12; // update the current X position for the next band, accounting for the spacing } else { currentX = bandX + bandWidth + 5; // update the current X position for the next band, accounting for the spacing }