Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E_showMenu_F18/Q3: Remove internal menu object l as argument to callback function #2569

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading