Skip to content

Commit 2df9977

Browse files
committed
Fixes for prettier
1 parent 2ef10bd commit 2df9977

File tree

5 files changed

+31
-14
lines changed

5 files changed

+31
-14
lines changed

ts/a11y/explorer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ export function ExplorerMathDocumentMixin<
432432
stroke: '#AAAAAA',
433433
fill: '#404040',
434434
},
435-
}
435+
},
436436
};
437437

438438
/**

ts/a11y/explorer/Region.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,13 @@ export abstract class AbstractRegion<T> implements Region<T> {
122122
*/
123123
public AddStyles() {
124124
const id = this.CLASS.sheetId;
125-
if (!this.CLASS.style || this.document.adaptor.head().querySelector('#' + id)) {
125+
if (
126+
!this.CLASS.style ||
127+
this.document.adaptor.head().querySelector('#' + id)
128+
) {
126129
return;
127130
}
128-
const node = this.document.adaptor.node('style', {id});
131+
const node = this.document.adaptor.node('style', { id });
129132
node.innerHTML = this.CLASS.style.cssText;
130133
this.document.adaptor.head().appendChild(node);
131134
}
@@ -416,11 +419,16 @@ export class LiveRegion extends StringRegion {
416419
* @param {Document} document The document whose CSS styles are to be adjusted
417420
*/
418421
public static setAlpha(type: string, alpha: number, document: Document) {
419-
const style = document.head.querySelector('#' + this.sheetId) as HTMLStyleElement;
422+
const style = document.head.querySelector(
423+
'#' + this.sheetId
424+
) as HTMLStyleElement;
420425
if (style) {
421426
const name = `--mjx-${type}-alpha`;
422427
(style.sheet.cssRules[0] as any).style.setProperty(name, alpha);
423-
(style.sheet.cssRules[1] as any).cssRules[0].style.setProperty(name, alpha ** 0.7071);
428+
(style.sheet.cssRules[1] as any).cssRules[0].style.setProperty(
429+
name,
430+
alpha ** 0.7071
431+
);
424432
}
425433
}
426434
}

ts/ui/dialog/DraggableDialog.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ export class DraggableDialog {
173173
* The default styles for all dialogs
174174
*/
175175
public static styles: StyleJson = {
176-
177176
//
178177
// For when dialog element is not available
179178
//
@@ -447,8 +446,6 @@ export class DraggableDialog {
447446
'background-color': '#888888 !important',
448447
},
449448
},
450-
451-
452449
};
453450

454451
protected static helpMessage: string = `

ts/ui/menu/Menu.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,13 @@ export class Menu {
621621
),
622622
this.a11yVar<string>('highlight', (value) => this.setHighlight(value)),
623623
this.a11yVar<string>('backgroundColor'),
624-
this.a11yVar<string>('backgroundOpacity', (value) => this.setAlpha('bg', value)),
624+
this.a11yVar<string>('backgroundOpacity', (value) =>
625+
this.setAlpha('bg', value)
626+
),
625627
this.a11yVar<string>('foregroundColor'),
626-
this.a11yVar<string>('foregroundOpacity', (value) => this.setAlpha('fg', value)),
628+
this.a11yVar<string>('foregroundOpacity', (value) =>
629+
this.setAlpha('fg', value)
630+
),
627631
this.a11yVar<boolean>('subtitles'),
628632
this.a11yVar<boolean>('viewBraille'),
629633
this.a11yVar<boolean>('voicing'),
@@ -1335,7 +1339,11 @@ export class Menu {
13351339
protected setAlpha(type: string, value: string) {
13361340
if (MathJax._?.a11y?.explorer) {
13371341
const alpha = parseInt(value) / 100;
1338-
MathJax._.a11y.explorer.Region.LiveRegion.setAlpha(type, alpha, this.document.document);
1342+
MathJax._.a11y.explorer.Region.LiveRegion.setAlpha(
1343+
type,
1344+
alpha,
1345+
this.document.document
1346+
);
13391347
}
13401348
}
13411349

ts/util/StyleJson.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,13 @@ export class StyleJsonSheet {
120120
const values: string[] = new Array(properties.length);
121121
let i = 0;
122122
for (const property of properties) {
123-
values[i++] = styles[property] instanceof Object
124-
? ' ' + this.getStyleRules({[property]: styles[property]} as StyleJson).join('\n ')
125-
: ' ' + property + ': ' + styles[property] + ';';
123+
values[i++] =
124+
styles[property] instanceof Object
125+
? ' ' +
126+
this.getStyleRules({
127+
[property]: styles[property],
128+
} as StyleJson).join('\n ')
129+
: ' ' + property + ': ' + styles[property] + ';';
126130
}
127131
return values.join('\n');
128132
}

0 commit comments

Comments
 (0)