Skip to content

Commit

Permalink
prog
Browse files Browse the repository at this point in the history
  • Loading branch information
Yisheng Jiang committed Dec 23, 2023
1 parent bff9a1c commit 52867bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
<span id="midilist"></span>
<span id="ctrls"> </span>
<input type="file" tabindex="0" value="send file" id="file-btn" accept=".mid" />
<div id="ch_ctrl_bar"></div>
</header>
<section>
<div id="ch_ctrl_bar"></div>
</section>
<section> <span id="sequenceroot"></span>
</section>
<div id="channelContainer"></div>
Expand Down
12 changes: 6 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const debugContainer = document.querySelector("#debug");
const footer = document.querySelector("footer");
const stdoutdiv = document.querySelector("#stdout");
const debugInfo = mkdiv("pre");
const ctrbar = mkdiv("dialog");
const debugInfo2 = mkdiv("pre");
const ffholder = mkdiv("div", { style: "display:flex;flex-direction:row" });
const ff = { container: ffholder, width: 220, height: 150 };
Expand All @@ -55,9 +54,7 @@ mkcollapse({ title: "fft", defaultOpen: true }, ffholder).attachTo(analyze);
mkcollapse({ title: "debug", defaultOpen: false }, debugInfo).attachTo(
debugContainer
);
mkcollapse({ title: "ctr", defaultOpen: true }, ctrbar).attachTo(
document.querySelector("#ch_ctrl_bar")
);

mkcollapse({ title: "debug2", defaultOpen: false }, debugInfo2).attachTo(
debugContainer
);
Expand Down Expand Up @@ -115,7 +112,10 @@ export const ui = mkui(
uiInputs()
);

const { push_ch, tabs } = mktabs({ group: "set_group", container: ctrbar });
const { push_ch, tabs } = mktabs({
group: "set_group",
container: document.querySelector("#ch_ctr_bar"),
});
uiControllers = ui.controllers;

for (let i = 0; i < 16; i++) {
Expand All @@ -132,7 +132,7 @@ for (let i = 0; i < 16; i++) {
);
}

document.body.querySelector(".tabs > input").setAttribute("checked", "");
document.body.querySelector(".tabs > input")?.setAttribute("checked", "");

if (midiUrl) {
await onMidionURLSelect(midiUrl);
Expand Down

0 comments on commit 52867bf

Please sign in to comment.