Skip to content

Commit

Permalink
Updating (#60).
Browse files Browse the repository at this point in the history
  • Loading branch information
gogins committed Mar 3, 2024
1 parent bd660ec commit 08b695d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
23 changes: 11 additions & 12 deletions music/NYCEMF-2024/cloud-5.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@ class Cloud5Piece extends HTMLElement {
const csound_message_callback_closure = function (message) {
host.csound_message_callback(message);
}
get_csound(csound_message_callback_closure);
//get_csound(csound_message_callback_closure);
let menu_item_play = document.querySelector('#menu_item_play');
menu_item_play.onclick = function (event) {
console.log("menu_item_play click...");
host.show(host.piano_roll_overlay)
host.hide(host.strudel_overlay);
host.hide(host.shader_overlay);
// host.hide(host.log_overlay);
host.hide(host.log_overlay);
host.hide(host.about_overlay);
host.render(false);
};
Expand All @@ -205,7 +205,7 @@ class Cloud5Piece extends HTMLElement {
host.show(host.piano_roll_overlay)
host.hide(host.strudel_overlay);
host.hide(host.shader_overlay);
// host.hide(host.log_overlay);
host.hide(host.log_overlay);
host.hide(host.about_overlay);
host.render(true);
};
Expand All @@ -217,6 +217,13 @@ class Cloud5Piece extends HTMLElement {
let menu_item_fullscreen = document.querySelector('#menu_item_fullscreen');
menu_item_fullscreen.onclick = function (event) {
console.log("menu_item_fullscreen click...");
if (host.piano_roll_overlay.requestFullscreen) {
host.piano_roll_overlay.requestFullscreen();
} else if (host.piano_roll_overlay.webkitRequestFullscreen) {
host.piano_roll_overlay.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) {
host.piano_roll_overlay.msRequestFullscreen();
}
};
let menu_item_strudel = document.querySelector('#menu_item_strudel');
menu_item_strudel.onclick = function (event) {
Expand Down Expand Up @@ -281,18 +288,10 @@ class Cloud5Piece extends HTMLElement {
}
});

this.hide(this.piano_roll_overlay);
this.hide(this.strudel_overlay);
this.hide(this.log_overlay);
this.show(this.about_overlay);

window.addEventListener("unload", function (event) {
nw_window?.close();
});

/**
* Send the value of the named control to Csound.
*/
// Polyfill to make 'render' behave like an async member function.
this.render = async function (is_offline) {
host.csound = await get_csound(host.csound_message_callback);
Expand Down Expand Up @@ -344,7 +343,7 @@ class Cloud5Piece extends HTMLElement {
}
show(overlay) {
if (overlay) {
overlay.style.display = '';
overlay.style.display = 'block';
}
}
hide(overlay) {
Expand Down
3 changes: 2 additions & 1 deletion music/NYCEMF-2024/cloud5-example.html
Original file line number Diff line number Diff line change
Expand Up @@ -2021,7 +2021,8 @@
<cloud5-shader class="w3-container cloud5-overlay"></cloud5-shader>
<cloud5-log class="w3-container cloud5-overlay"></cloud5-log>
<cloud5-about class="w3-container cloud5-overlay">
<div class="cloud5-about">
<divs>
<!-- <div class="cloud5-about"> -->
<h1 style="font-size: 15px;">cloud-5 example</h1>
<h2 style="font-size: 13px">Michael Gogins<br>
February 2024</h2>
Expand Down

0 comments on commit 08b695d

Please sign in to comment.