Skip to content

Commit

Permalink
calculator: append '...' to truncated numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
flaparoo committed Sep 10, 2024
1 parent dbeeee9 commit 6bf66d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/calculator/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
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.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)
2 changes: 1 addition & 1 deletion apps/calculator/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ function displayOutput(num) {
num = num.replace("-","- "); // fix padding for '-'
g.setFont('7x11Numeric7Seg', 2);
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);
Expand Down

0 comments on commit 6bf66d5

Please sign in to comment.