Skip to content

Commit

Permalink
Wrap each command element in a div.
Browse files Browse the repository at this point in the history
This forces vertical alignment when multiple checkboxes, for instance, are
present.
  • Loading branch information
Mike Castle committed Oct 12, 2024
1 parent 624697c commit eebab7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/explore.js
Original file line number Diff line number Diff line change
Expand Up @@ -828,13 +828,15 @@ window.plugin.explore.central = function() {
});
const div = dia.find('div');
for (const item of commands) {
const wrapper = document.createElement('div');
const elem = document.createElement(item.elem);
elem.innerText = item.label;
if (item.post_create) {
item.post_create(elem);
}
elem.addEventListener('click', item.func);
div.append(elem);
wrapper.append(elem);
div.append(wrapper);
}
const table = document.createElement('table');
const tbody = document.createElement('tbody');
Expand Down

0 comments on commit eebab7d

Please sign in to comment.