Skip to content

Commit 187a62f

Browse files
committed
Applied prettier formatting for eslint checks
1 parent 7f3b9af commit 187a62f

File tree

13 files changed

+257
-266
lines changed

13 files changed

+257
-266
lines changed

js/activity.js

Lines changed: 46 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,7 +2055,7 @@ class Activity {
20552055
const changeText = () => {
20562056
const randomLoadMessage =
20572057
messages.load_messages[
2058-
Math.floor(Math.random() * messages.load_messages.length)
2058+
Math.floor(Math.random() * messages.load_messages.length)
20592059
];
20602060
document.getElementById("messageText").innerHTML = randomLoadMessage + "...";
20612061
counter++;
@@ -2999,11 +2999,11 @@ class Activity {
29992999
.data("item.autocomplete", item)
30003000
.append(
30013001
'<img src="' +
3002-
item.artwork +
3003-
'" height="20px">' +
3004-
"<a> " +
3005-
item.label +
3006-
"</a>"
3002+
item.artwork +
3003+
'" height="20px">' +
3004+
"<a> " +
3005+
item.label +
3006+
"</a>"
30073007
)
30083008
.appendTo(
30093009
ul.css({
@@ -3121,7 +3121,7 @@ class Activity {
31213121
if (
31223122
this.blocks.blockList[bottom].name === "hidden" &&
31233123
this.blocks.blockList[this.blocks.blockList[bottom].connections[0]].name ===
3124-
"newnote"
3124+
"newnote"
31253125
) {
31263126
// The note block macro creates nine blocks.
31273127
const newlyCreatedBlock = this.blocks.blockList.length - 9;
@@ -4540,8 +4540,8 @@ class Activity {
45404540
console.log(
45414541
"%cMusic Blocks",
45424542
"font-size: 24px; font-weight: bold; font-family: sans-serif; padding:20px 0 0 110px; background: url(" +
4543-
imgUrl +
4544-
") no-repeat;"
4543+
imgUrl +
4544+
") no-repeat;"
45454545
);
45464546
// eslint-disable-next-line no-console
45474547
console.log(
@@ -4613,10 +4613,10 @@ class Activity {
46134613
typeof flags !== "undefined"
46144614
? flags
46154615
: {
4616-
run: false,
4617-
show: false,
4618-
collapse: false
4619-
};
4616+
run: false,
4617+
show: false,
4618+
collapse: false
4619+
};
46204620
this.loading = true;
46214621
document.body.style.cursor = "wait";
46224622
this.doLoadAnimation();
@@ -4979,9 +4979,8 @@ class Activity {
49794979
[
49804980
"nameddo",
49814981
{
4982-
value: `V: ${parseInt(lineId) + 1} Line ${
4983-
staffBlocksMap[lineId]?.baseBlocks?.length + 1
4984-
}`
4982+
value: `V: ${parseInt(lineId) + 1} Line ${staffBlocksMap[lineId]?.baseBlocks?.length + 1
4983+
}`
49854984
}
49864985
],
49874986
0,
@@ -4990,12 +4989,12 @@ class Activity {
49904989
staffBlocksMap[lineId].baseBlocks.length === 0
49914990
? null
49924991
: staffBlocksMap[lineId].baseBlocks[
4993-
staffBlocksMap[lineId].baseBlocks.length - 1
4994-
][0][
4995-
staffBlocksMap[lineId].baseBlocks[
4996-
staffBlocksMap[lineId].baseBlocks.length - 1
4997-
][0].length - 4
4998-
][0],
4992+
staffBlocksMap[lineId].baseBlocks.length - 1
4993+
][0][
4994+
staffBlocksMap[lineId].baseBlocks[
4995+
staffBlocksMap[lineId].baseBlocks.length - 1
4996+
][0].length - 4
4997+
][0],
49994998
null
50004999
]
50015000
],
@@ -5011,9 +5010,8 @@ class Activity {
50115010
[
50125011
"text",
50135012
{
5014-
value: `V: ${parseInt(lineId) + 1} Line ${
5015-
staffBlocksMap[lineId]?.baseBlocks?.length + 1
5016-
}`
5013+
value: `V: ${parseInt(lineId) + 1} Line ${staffBlocksMap[lineId]?.baseBlocks?.length + 1
5014+
}`
50175015
}
50185016
],
50195017
0,
@@ -5048,14 +5046,14 @@ class Activity {
50485046
staffBlocksMap[staffIndex].startBlock.length - 3
50495047
][4][2] =
50505048
staffBlocksMap[staffIndex].baseBlocks[0][0][
5051-
staffBlocksMap[staffIndex].baseBlocks[0][0].length - 4
5049+
staffBlocksMap[staffIndex].baseBlocks[0][0].length - 4
50525050
][0];
50535051
// Update the first namedo block with settimbre
50545052
staffBlocksMap[staffIndex].baseBlocks[0][0][
50555053
staffBlocksMap[staffIndex].baseBlocks[0][0].length - 4
50565054
][4][0] =
50575055
staffBlocksMap[staffIndex].startBlock[
5058-
staffBlocksMap[staffIndex].startBlock.length - 3
5056+
staffBlocksMap[staffIndex].startBlock.length - 3
50595057
][0];
50605058
const repeatblockids = staffBlocksMap[staffIndex].repeatArray;
50615059
for (const repeatId of repeatblockids) {
@@ -5067,7 +5065,7 @@ class Activity {
50675065
0,
50685066
[
50695067
staffBlocksMap[staffIndex].startBlock[
5070-
staffBlocksMap[staffIndex].startBlock.length - 3
5068+
staffBlocksMap[staffIndex].startBlock.length - 3
50715069
][0] /*setribmre*/,
50725070
blockId + 1,
50735071
staffBlocksMap[staffIndex].nameddoArray[staffIndex][0],
@@ -5076,8 +5074,8 @@ class Activity {
50765074
] === null
50775075
? null
50785076
: staffBlocksMap[staffIndex].nameddoArray[staffIndex][
5079-
repeatId.end + 1
5080-
]
5077+
repeatId.end + 1
5078+
]
50815079
]
50825080
]);
50835081
staffBlocksMap[staffIndex].repeatBlock.push([
@@ -5111,7 +5109,7 @@ class Activity {
51115109
const secondnammedo = _searchIndexForMusicBlock(
51125110
staffBlocksMap[staffIndex].baseBlocks[repeatId.end + 1][0],
51135111
staffBlocksMap[staffIndex].nameddoArray[staffIndex][
5114-
repeatId.end + 1
5112+
repeatId.end + 1
51155113
]
51165114
);
51175115

@@ -5135,31 +5133,31 @@ class Activity {
51355133
const prevnameddo = _searchIndexForMusicBlock(
51365134
staffBlocksMap[staffIndex].baseBlocks[repeatId.start - 1][0],
51375135
staffBlocksMap[staffIndex].baseBlocks[repeatId.start][0][
5138-
currentnammeddo
5136+
currentnammeddo
51395137
][4][0]
51405138
);
51415139
const afternamedo = _searchIndexForMusicBlock(
51425140
staffBlocksMap[staffIndex].baseBlocks[repeatId.end][0],
51435141
staffBlocksMap[staffIndex].baseBlocks[repeatId.start][0][
5144-
currentnammeddo
5142+
currentnammeddo
51455143
][4][1]
51465144
);
51475145
let prevrepeatnameddo = -1;
51485146
if (prevnameddo === -1) {
51495147
prevrepeatnameddo = _searchIndexForMusicBlock(
51505148
staffBlocksMap[staffIndex].repeatBlock,
51515149
staffBlocksMap[staffIndex].baseBlocks[repeatId.start][0][
5152-
currentnammeddo
5150+
currentnammeddo
51535151
][4][0]
51545152
);
51555153
}
51565154
const prevBlockId =
51575155
staffBlocksMap[staffIndex].baseBlocks[repeatId.start][0][
5158-
currentnammeddo
5156+
currentnammeddo
51595157
][4][0];
51605158
const currentBlockId =
51615159
staffBlocksMap[staffIndex].baseBlocks[repeatId.start][0][
5162-
currentnammeddo
5160+
currentnammeddo
51635161
][0];
51645162

51655163
// Needs null checking optmizie
@@ -5173,7 +5171,7 @@ class Activity {
51735171
0,
51745172
[
51755173
staffBlocksMap[staffIndex].baseBlocks[repeatId.start][0][
5176-
currentnammeddo
5174+
currentnammeddo
51775175
][4][0],
51785176
blockId + 1,
51795177
currentBlockId,
@@ -5789,7 +5787,7 @@ class Activity {
57895787
this.update = true;
57905788
};
57915789

5792-
this.__showAltoAccidentals = () => {};
5790+
this.__showAltoAccidentals = () => { };
57935791

57945792
/*
57955793
* Shows musical alto staff
@@ -6456,12 +6454,12 @@ class Activity {
64566454
.data("item.autocomplete", item)
64576455
.append(
64586456
'<img src="' +
6459-
item.artwork +
6460-
'" height = "20px">' +
6461-
"<a>" +
6462-
" " +
6463-
item.label +
6464-
"</a>"
6457+
item.artwork +
6458+
'" height = "20px">' +
6459+
"<a>" +
6460+
" " +
6461+
item.label +
6462+
"</a>"
64656463
)
64666464
.appendTo(ul.css("z-index", 9999));
64676465
};
@@ -6576,10 +6574,10 @@ class Activity {
65766574
container.setAttribute(
65776575
"style",
65786576
"position: absolute; right:" +
6579-
(document.body.clientWidth - x) +
6580-
"px; top: " +
6581-
y +
6582-
"px;"
6577+
(document.body.clientWidth - x) +
6578+
"px; top: " +
6579+
y +
6580+
"px;"
65836581
);
65846582
document.getElementById("buttoncontainerBOTTOM").appendChild(container);
65856583
return container;

js/block.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3023,10 +3023,10 @@ class Block {
30233023
setTimeout(() => {
30243024
moved =
30253025
Math.abs(event.stageX / that.activity.getStageScale() - that.original.x) +
3026-
Math.abs(
3027-
event.stageY / that.activity.getStageScale() - that.original.y
3028-
) >
3029-
20 && !window.hasMouse;
3026+
Math.abs(
3027+
event.stageY / that.activity.getStageScale() - that.original.y
3028+
) >
3029+
20 && !window.hasMouse;
30303030
getInput = !moved;
30313031
}, 200);
30323032
}

js/blockfactory.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,10 +1121,10 @@ class SVG {
11211121
let svg = this._startBoolean(
11221122
this._strokeWidth / 2.0,
11231123
this._radius * 5.5 +
1124-
this._strokeWidth / 2.0 +
1125-
this._innieY2 +
1126-
this._inniesSpacer +
1127-
this._expandY
1124+
this._strokeWidth / 2.0 +
1125+
this._innieY2 +
1126+
this._inniesSpacer +
1127+
this._expandY
11281128
);
11291129
svg += this._rLineTo(
11301130
0,

js/blocks/MediaBlocks.js

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@ function setupMediaBlocks(activity) {
4343
if (_THIS_IS_MUSIC_BLOCKS_) {
4444
this.setHelpString([
4545
_("The Right block returns the position of the right of the canvas.") +
46-
" " +
47-
_(
48-
"In this example, the mouse moves right until it reaches the right edge of the canvas; then it reappears at the left of the canvas."
49-
),
46+
" " +
47+
_(
48+
"In this example, the mouse moves right until it reaches the right edge of the canvas; then it reappears at the left of the canvas."
49+
),
5050
"documentation",
5151
null,
5252
"lrhelp"
5353
]);
5454
} else {
5555
this.setHelpString([
5656
_("The Right block returns the position of the right of the canvas.") +
57-
" " +
58-
_(
59-
"In this example, the turtle moves right until it reaches the right edge of the canvas; then it reappears at the left of the canvas."
60-
),
57+
" " +
58+
_(
59+
"In this example, the turtle moves right until it reaches the right edge of the canvas; then it reappears at the left of the canvas."
60+
),
6161
"documentation",
6262
null,
6363
"lrhelp"
@@ -105,21 +105,21 @@ function setupMediaBlocks(activity) {
105105
if (_THIS_IS_MUSIC_BLOCKS_) {
106106
this.setHelpString([
107107
_("The Left block returns the position of the left of the canvas.") +
108-
" " +
109-
_(
110-
"In this example, the mouse moves right until it reaches the right edge of the canvas; then it reappears at the left of the canvas."
111-
),
108+
" " +
109+
_(
110+
"In this example, the mouse moves right until it reaches the right edge of the canvas; then it reappears at the left of the canvas."
111+
),
112112
"documentation",
113113
null,
114114
"lrhelp"
115115
]);
116116
} else {
117117
this.setHelpString([
118118
_("The Left block returns the position of the left of the canvas.") +
119-
" " +
120-
_(
121-
"In this example, the turtle moves right until it reaches the right edge of the canvas; then it reappears at the left of the canvas."
122-
),
119+
" " +
120+
_(
121+
"In this example, the turtle moves right until it reaches the right edge of the canvas; then it reappears at the left of the canvas."
122+
),
123123
"documentation",
124124
null,
125125
"lrhelp"
@@ -166,21 +166,21 @@ function setupMediaBlocks(activity) {
166166
if (_THIS_IS_MUSIC_BLOCKS_) {
167167
this.setHelpString([
168168
_("The Top block returns the position of the top of the canvas.") +
169-
" " +
170-
_(
171-
"In this example, the mouse moves upward until it reaches the top edge of the canvas; then it reappears at the bottom of the canvas."
172-
),
169+
" " +
170+
_(
171+
"In this example, the mouse moves upward until it reaches the top edge of the canvas; then it reappears at the bottom of the canvas."
172+
),
173173
"documentation",
174174
null,
175175
"bottomposhelp"
176176
]);
177177
} else {
178178
this.setHelpString([
179179
_("The Top block returns the position of the top of the canvas.") +
180-
" " +
181-
_(
182-
"In this example, the turtle moves upward until it reaches the top edge of the canvas; then it reappears at the bottom of the canvas."
183-
),
180+
" " +
181+
_(
182+
"In this example, the turtle moves upward until it reaches the top edge of the canvas; then it reappears at the bottom of the canvas."
183+
),
184184
"documentation",
185185
null,
186186
"bottomposhelp"
@@ -227,21 +227,21 @@ function setupMediaBlocks(activity) {
227227
if (_THIS_IS_MUSIC_BLOCKS_) {
228228
this.setHelpString([
229229
_("The Bottom block returns the position of the bottom of the canvas.") +
230-
" " +
231-
_(
232-
"In this example, the mouse moves upward until it reaches the top edge of the canvas; then it reappears at the bottom of the canvas."
233-
),
230+
" " +
231+
_(
232+
"In this example, the mouse moves upward until it reaches the top edge of the canvas; then it reappears at the bottom of the canvas."
233+
),
234234
"documentation",
235235
null,
236236
"bottomposhelp"
237237
]);
238238
} else {
239239
this.setHelpString([
240240
_("The Bottom block returns the position of the bottom of the canvas.") +
241-
" " +
242-
_(
243-
"In this example, the turtle moves upward until it reaches the top edge of the canvas; then it reappears at the bottom of the canvas."
244-
),
241+
" " +
242+
_(
243+
"In this example, the turtle moves upward until it reaches the top edge of the canvas; then it reappears at the bottom of the canvas."
244+
),
245245
"documentation",
246246
null,
247247
"bottomposhelp"

0 commit comments

Comments
 (0)