mirror of https://github.com/espruino/BangleApps
calculator: append '...' to truncated numbers
parent
dbeeee980f
commit
6bf66d5fa2
|
@ -5,4 +5,4 @@
|
||||||
0.05: Grid positioning and swipe controls to switch between numbers, operators and special (for Bangle.js 2)
|
0.05: Grid positioning and swipe controls to switch between numbers, operators and special (for Bangle.js 2)
|
||||||
0.06: Bangle.js 2: Exit with a short press of the physical button
|
0.06: Bangle.js 2: Exit with a short press of the physical button
|
||||||
0.07: Bangle.js 2: Exit by pressing upper left corner of the screen
|
0.07: Bangle.js 2: Exit by pressing upper left corner of the screen
|
||||||
0.08: truncate long numbers (and append '-' to displayed value)
|
0.08: truncate long numbers (and append '...' to displayed value)
|
||||||
|
|
|
@ -233,7 +233,7 @@ function displayOutput(num) {
|
||||||
num = num.replace("-","- "); // fix padding for '-'
|
num = num.replace("-","- "); // fix padding for '-'
|
||||||
g.setFont('7x11Numeric7Seg', 2);
|
g.setFont('7x11Numeric7Seg', 2);
|
||||||
if (num.length > RESULT_MAX_LEN) {
|
if (num.length > RESULT_MAX_LEN) {
|
||||||
num = num.substr(0, RESULT_MAX_LEN - 1)+'-';
|
num = num.substr(0, RESULT_MAX_LEN - 1)+'...';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g.setFontAlign(1,0);
|
g.setFontAlign(1,0);
|
||||||
|
|
Loading…
Reference in New Issue