pad_editbar: Deprecate the toggleDropDown callback

This commit is contained in:
Richard Hansen 2021-07-15 18:59:29 -04:00
parent c629ee09a8
commit ee41de4809
2 changed files with 4 additions and 2 deletions

View file

@ -5,7 +5,7 @@ src/static/js/pad_editbar.js
## disable()
## toggleDropDown(dropdown, callback)
## toggleDropDown(dropdown)
Shows the dropdown `div.popup` whose `id` equals `dropdown`.
## registerCommand(cmd, callback)

View file

@ -200,7 +200,9 @@ exports.padeditbar = {
}
if (padeditor.ace) padeditor.ace.focus();
},
toggleDropDown(moduleName, cb) {
// cb is deprecated (this function is synchronous so a callback is unnecessary).
toggleDropDown(moduleName, cb = null) {
let cbErr = null;
try {
// do nothing if users are sticked