Skip to content

Commit

Permalink
final
Browse files Browse the repository at this point in the history
  • Loading branch information
Commanderk3 committed Dec 27, 2024
1 parent d4faf70 commit d7f73a2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
7 changes: 1 addition & 6 deletions js/blocks/ExtrasBlocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,7 @@ function setupExtrasBlocks(activity) {
}
}
} else if (logo.inMatrix) {
logo.phraseMaker.addRowBlock(blk);
if (!logo.pitchBlocks.includes(blk)) {
logo.pitchBlocks.push(blk);
}
logo.phraseMaker.rowLabels.push(activity.blocks.blockList[blk].name);
logo.phraseMaker.rowArgs.push(args[0]);
logo.phraseMaker._lyricsON = true;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions js/blocks/WidgetBlocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -1430,6 +1430,7 @@ function setupWidgetBlocks(activity) {
logo.phraseMaker.rowArgs = [];
logo.phraseMaker.graphicsBlocks = [];
logo.phraseMaker.clearBlocks();
logo.phraseMaker._lyricsON = false;

logo.tupletRhythms = [];
logo.tupletParams = [];
Expand Down
13 changes: 8 additions & 5 deletions js/widgets/phrasemaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class PhraseMaker {
*/
this._lyrics = [];

this._lyricsON = true;
this._lyricsON = false;

this._durationArray = [];

Expand Down Expand Up @@ -516,6 +516,7 @@ class PhraseMaker {
this.activity.hideMsgs();
docById("wheelDivptm").style.display = "none";

document.onkeydown = activity.__keyPressed;
widgetWindow.destroy();
};

Expand Down Expand Up @@ -930,9 +931,8 @@ class PhraseMaker {


// Add a row for lyrics
if (this.rowLabels.includes("print")) {
if (this._lyricsON) {

this._lyricsON = true;
const lyricsRow = ptmTable.insertRow();
lyricsRow.setAttribute("id", "lyricRow");
lyricsRow.style.position = "sticky";
Expand Down Expand Up @@ -993,6 +993,7 @@ class PhraseMaker {
inputCell.appendChild(lyricsInput);
lyricsInput.addEventListener("input", (event) => {
this._lyrics[i] = event.target.value;
lyricsInput.focus();
});
};
lyricsRow.insertCell().appendChild(tempTable);
Expand Down Expand Up @@ -2466,6 +2467,8 @@ class PhraseMaker {

// Keep track of marked cells.
this._markedColsInRow = [];
console.log("in sort ->",this._lyricsON);
//let lyricsSwitch = this._lyricsON;
let thisRow, row, n, cell;
for (let r = 0; r < this.rowLabels.length; r++) {
thisRow = [];
Expand Down Expand Up @@ -2649,6 +2652,7 @@ class PhraseMaker {
}

this.makeClickable();
//this._lyricsON = false;

}

Expand Down Expand Up @@ -3085,8 +3089,7 @@ class PhraseMaker {
for (let j = 0; j < numBeats; j++) {
for (let i = 0; i < rowCount; i++) {
// Depending on the row, we choose a different background color.
if (this.rowLabels[i] === "print") break;
else if (
if (
MATRIXGRAPHICS.indexOf(this.rowLabels[i]) != -1 ||
MATRIXGRAPHICS2.indexOf(this.rowLabels[i]) != -1
) {
Expand Down

0 comments on commit d7f73a2

Please sign in to comment.