Skip to content

Commit 5396a38

Browse files
committed
Prettier on activity.js
1 parent d342a63 commit 5396a38

File tree

1 file changed

+43
-41
lines changed

1 file changed

+43
-41
lines changed

js/activity.js

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,7 +2247,7 @@ class Activity {
22472247
const changeText = () => {
22482248
const randomLoadMessage =
22492249
messages.load_messages[
2250-
Math.floor(Math.random() * messages.load_messages.length)
2250+
Math.floor(Math.random() * messages.load_messages.length)
22512251
];
22522252
document.getElementById("messageText").innerHTML = randomLoadMessage + "...";
22532253
counter++;
@@ -3352,9 +3352,9 @@ class Activity {
33523352
that.blocks.moveBlock(
33533353
newBlock,
33543354
(x || that.blocksContainer.x + 100) -
3355-
that.blocksContainer.x,
3355+
that.blocksContainer.x,
33563356
(y || that.blocksContainer.y + 100) -
3357-
that.blocksContainer.y
3357+
that.blocksContainer.y
33583358
);
33593359
}
33603360
);
@@ -4806,8 +4806,8 @@ class Activity {
48064806
console.log(
48074807
"%cMusic Blocks",
48084808
"font-size: 24px; font-weight: bold; font-family: sans-serif; padding:20px 0 0 110px; background: url(" +
4809-
imgUrl +
4810-
") no-repeat;"
4809+
imgUrl +
4810+
") no-repeat;"
48114811
);
48124812
// eslint-disable-next-line no-console
48134813
console.log(
@@ -4879,10 +4879,10 @@ class Activity {
48794879
typeof flags !== "undefined"
48804880
? flags
48814881
: {
4882-
run: false,
4883-
show: false,
4884-
collapse: false
4885-
};
4882+
run: false,
4883+
show: false,
4884+
collapse: false
4885+
};
48864886
this.loading = true;
48874887
document.body.style.cursor = "wait";
48884888
this.doLoadAnimation();
@@ -5245,8 +5245,9 @@ class Activity {
52455245
[
52465246
"nameddo",
52475247
{
5248-
value: `V: ${parseInt(lineId) + 1} Line ${staffBlocksMap[lineId]?.baseBlocks?.length + 1
5249-
}`
5248+
value: `V: ${parseInt(lineId) + 1} Line ${
5249+
staffBlocksMap[lineId]?.baseBlocks?.length + 1
5250+
}`
52505251
}
52515252
],
52525253
0,
@@ -5255,12 +5256,12 @@ class Activity {
52555256
staffBlocksMap[lineId].baseBlocks.length === 0
52565257
? null
52575258
: staffBlocksMap[lineId].baseBlocks[
5258-
staffBlocksMap[lineId].baseBlocks.length - 1
5259-
][0][
5260-
staffBlocksMap[lineId].baseBlocks[
5261-
staffBlocksMap[lineId].baseBlocks.length - 1
5262-
][0].length - 4
5263-
][0],
5259+
staffBlocksMap[lineId].baseBlocks.length - 1
5260+
][0][
5261+
staffBlocksMap[lineId].baseBlocks[
5262+
staffBlocksMap[lineId].baseBlocks.length - 1
5263+
][0].length - 4
5264+
][0],
52645265
null
52655266
]
52665267
],
@@ -5276,8 +5277,9 @@ class Activity {
52765277
[
52775278
"text",
52785279
{
5279-
value: `V: ${parseInt(lineId) + 1} Line ${staffBlocksMap[lineId]?.baseBlocks?.length + 1
5280-
}`
5280+
value: `V: ${parseInt(lineId) + 1} Line ${
5281+
staffBlocksMap[lineId]?.baseBlocks?.length + 1
5282+
}`
52815283
}
52825284
],
52835285
0,
@@ -5312,14 +5314,14 @@ class Activity {
53125314
staffBlocksMap[staffIndex].startBlock.length - 3
53135315
][4][2] =
53145316
staffBlocksMap[staffIndex].baseBlocks[0][0][
5315-
staffBlocksMap[staffIndex].baseBlocks[0][0].length - 4
5317+
staffBlocksMap[staffIndex].baseBlocks[0][0].length - 4
53165318
][0];
53175319
// Update the first namedo block with settimbre
53185320
staffBlocksMap[staffIndex].baseBlocks[0][0][
53195321
staffBlocksMap[staffIndex].baseBlocks[0][0].length - 4
53205322
][4][0] =
53215323
staffBlocksMap[staffIndex].startBlock[
5322-
staffBlocksMap[staffIndex].startBlock.length - 3
5324+
staffBlocksMap[staffIndex].startBlock.length - 3
53235325
][0];
53245326
const repeatblockids = staffBlocksMap[staffIndex].repeatArray;
53255327
for (const repeatId of repeatblockids) {
@@ -5331,7 +5333,7 @@ class Activity {
53315333
0,
53325334
[
53335335
staffBlocksMap[staffIndex].startBlock[
5334-
staffBlocksMap[staffIndex].startBlock.length - 3
5336+
staffBlocksMap[staffIndex].startBlock.length - 3
53355337
][0] /*setribmre*/,
53365338
blockId + 1,
53375339
staffBlocksMap[staffIndex].nameddoArray[staffIndex][0],
@@ -5340,8 +5342,8 @@ class Activity {
53405342
] === null
53415343
? null
53425344
: staffBlocksMap[staffIndex].nameddoArray[staffIndex][
5343-
repeatId.end + 1
5344-
]
5345+
repeatId.end + 1
5346+
]
53455347
]
53465348
]);
53475349
staffBlocksMap[staffIndex].repeatBlock.push([
@@ -5375,7 +5377,7 @@ class Activity {
53755377
const secondnammedo = _searchIndexForMusicBlock(
53765378
staffBlocksMap[staffIndex].baseBlocks[repeatId.end + 1][0],
53775379
staffBlocksMap[staffIndex].nameddoArray[staffIndex][
5378-
repeatId.end + 1
5380+
repeatId.end + 1
53795381
]
53805382
);
53815383

@@ -5398,31 +5400,31 @@ class Activity {
53985400
const prevnameddo = _searchIndexForMusicBlock(
53995401
staffBlocksMap[staffIndex].baseBlocks[repeatId.start - 1][0],
54005402
staffBlocksMap[staffIndex].baseBlocks[repeatId.start][0][
5401-
currentnammeddo
5403+
currentnammeddo
54025404
][4][0]
54035405
);
54045406
const afternamedo = _searchIndexForMusicBlock(
54055407
staffBlocksMap[staffIndex].baseBlocks[repeatId.end][0],
54065408
staffBlocksMap[staffIndex].baseBlocks[repeatId.start][0][
5407-
currentnammeddo
5409+
currentnammeddo
54085410
][4][1]
54095411
);
54105412
let prevrepeatnameddo = -1;
54115413
if (prevnameddo === -1) {
54125414
prevrepeatnameddo = _searchIndexForMusicBlock(
54135415
staffBlocksMap[staffIndex].repeatBlock,
54145416
staffBlocksMap[staffIndex].baseBlocks[repeatId.start][0][
5415-
currentnammeddo
5417+
currentnammeddo
54165418
][4][0]
54175419
);
54185420
}
54195421
const prevBlockId =
54205422
staffBlocksMap[staffIndex].baseBlocks[repeatId.start][0][
5421-
currentnammeddo
5423+
currentnammeddo
54225424
][4][0];
54235425
const currentBlockId =
54245426
staffBlocksMap[staffIndex].baseBlocks[repeatId.start][0][
5425-
currentnammeddo
5427+
currentnammeddo
54265428
][0];
54275429

54285430
// Needs null checking optmizie
@@ -5436,7 +5438,7 @@ class Activity {
54365438
0,
54375439
[
54385440
staffBlocksMap[staffIndex].baseBlocks[repeatId.start][0][
5439-
currentnammeddo
5441+
currentnammeddo
54405442
][4][0],
54415443
blockId + 1,
54425444
currentBlockId,
@@ -6750,12 +6752,12 @@ class Activity {
67506752
return $j("<li></li>")
67516753
.append(
67526754
'<img src="' +
6753-
(item.artwork || "") +
6754-
'" height = "20px">' +
6755-
"<a>" +
6756-
" " +
6757-
item.label +
6758-
"</a>"
6755+
(item.artwork || "") +
6756+
'" height = "20px">' +
6757+
"<a>" +
6758+
" " +
6759+
item.label +
6760+
"</a>"
67596761
)
67606762
.appendTo(ul.css("z-index", 35000));
67616763
};
@@ -6879,10 +6881,10 @@ class Activity {
68796881
container.setAttribute(
68806882
"style",
68816883
"position: absolute; right:" +
6882-
(document.body.clientWidth - x) +
6883-
"px; top: " +
6884-
y +
6885-
"px;"
6884+
(document.body.clientWidth - x) +
6885+
"px; top: " +
6886+
y +
6887+
"px;"
68866888
);
68876889
document.getElementById("buttoncontainerBOTTOM").appendChild(container);
68886890
return container;

0 commit comments

Comments
 (0)