Merge pull request #2813 from stweedo/ohmcalc
[ohmcalc] - v0.04: Fix font size not resetting on subsequent values i…master
commit
28519f4888
|
|
@ -1,3 +1,4 @@
|
||||||
0.01: New App!
|
0.01: New App!
|
||||||
0.02: New Results menu item to show the formula and values used.
|
0.02: New Results menu item to show the formula and values used.
|
||||||
0.03: Adds haptics to Input screen and long press "C" to go back.
|
0.03: Adds haptics to Input screen and long press "C" to go back.
|
||||||
|
0.04: Fix font size not resetting on subsequent values in results screen
|
||||||
|
|
|
||||||
|
|
@ -291,13 +291,11 @@ function calculateValue(calculatedVariable, variableValues) {
|
||||||
function drawResultScreen(result) {
|
function drawResultScreen(result) {
|
||||||
let drawPage = function() {
|
let drawPage = function() {
|
||||||
clearScreen();
|
clearScreen();
|
||||||
let fontSize = 30; // Initial font size
|
|
||||||
let lineSpacing = 15; // Space between lines
|
|
||||||
|
|
||||||
// Define the vertical positions of the titles
|
// Define the vertical positions of the titles
|
||||||
let titlePositions = [10, 72, 132];
|
let titlePositions = [10, 72, 132];
|
||||||
|
let lineSpacing = 15; // Space between lines
|
||||||
for (let i = 0; i < result.result.length; i++) {
|
for (let i = 0; i < result.result.length; i++) {
|
||||||
|
let fontSize = 30; // Initial font size
|
||||||
let currentResult = result.result[i];
|
let currentResult = result.result[i];
|
||||||
let resultTitle = currentResult[0];
|
let resultTitle = currentResult[0];
|
||||||
let resultValue = currentResult[1];
|
let resultValue = currentResult[1];
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "ohmcalc",
|
"id": "ohmcalc",
|
||||||
"name": "Ohm's Law Calculator",
|
"name": "Ohm's Law Calculator",
|
||||||
"shortName": "Ohm's Law Calc",
|
"shortName": "Ohm's Law Calc",
|
||||||
"version": "0.03",
|
"version": "0.04",
|
||||||
"description": "A smart and simple calculator for Ohm's Law calculations, designed specifically for Bangle.js 2 smartwatches. Handles voltage, current, resistance, and power calculations with smart logic to prevent invalid inputs.",
|
"description": "A smart and simple calculator for Ohm's Law calculations, designed specifically for Bangle.js 2 smartwatches. Handles voltage, current, resistance, and power calculations with smart logic to prevent invalid inputs.",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"type": "app",
|
"type": "app",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue