Skip to content

Commit

Permalink
Fix issue with >1 layout button on Bangle.js 2: http://forum.espruino…
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Jun 28, 2022
1 parent fe707c3 commit 6ad485c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/Layout.js
Expand Up @@ -37,9 +37,9 @@ function Layout(layout, options) {

if (this.options.btns) {
var buttons = this.options.btns;
this.b = buttons;
if (this.physBtns >= buttons.length) {
// enough physical buttons
this.b = buttons;
let btnHeight = Math.floor(Bangle.appRect.h / this.physBtns);
if (this.physBtns > 2 && buttons.length==1)
buttons.unshift({label:""}); // pad so if we have a button in the middle
Expand Down
4 changes: 2 additions & 2 deletions modules/Layout.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6ad485c

Please sign in to comment.