Skip to content

Commit

Permalink
Merge pull request #2569 from thyttan/showmenu-q3-remove-scroller-as-…
Browse files Browse the repository at this point in the history
…callback-argument

E_showMenu_F18/Q3: Remove internal menu object `l` as argument to callback function
  • Loading branch information
gfwilliams authored Oct 11, 2024
2 parents 133933b + a49add7 commit 1ac31de
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
removeListener while executing events no longer stops subsequent listeners from executing (#2151)
jsvObjectIterator is now safe even if not called on something iterable
X.on now always allocates an array - tidies up code (fix #2559)
Bangle.js: E.showMenu no longer sends the internal `l` menu object as argument when running the callback function.

2v24 : Bangle.js2: Add 'Bangle.touchRd()', 'Bangle.touchWr()'
Bangle.js2: After Bangle.showTestScreen, put Bangle.js into a hard off state (not soft off)
Expand Down
4 changes: 2 additions & 2 deletions libs/js/banglejs/E_showMenu_F18.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
item.onchange(item.value);
l.draw(options.selected, options.selected);
}
} else if ("function" == typeof item) item(l);
} else if ("function" == typeof item) item();
else if ("object" == typeof item) {
// if a number, go into 'edit mode'
if ("number" == typeof item.value) {
Expand Down Expand Up @@ -198,4 +198,4 @@
};
l.draw();
return l;
})
})
2 changes: 1 addition & 1 deletion libs/js/banglejs/E_showMenu_F18.min.js

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

2 changes: 1 addition & 1 deletion libs/js/banglejs/E_showMenu_Q3.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
if (idx<0) return back&&back(); // title
var item = menu[keys[idx]];
Bangle.buzz(20);
if ("function" == typeof item) item(l);
if ("function" == typeof item) item();
else if ("object" == typeof item) {
// if a bool, just toggle it
if ("number" == typeof item.value) {
Expand Down
14 changes: 7 additions & 7 deletions libs/js/banglejs/E_showMenu_Q3.min.js

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

0 comments on commit 1ac31de

Please sign in to comment.