Format the TypeScript files (#877)

This commit is contained in:
woxtu
2022-10-28 17:48:27 +09:00
committed by GitHub
parent 1c53d91c6b
commit 9543019336
13 changed files with 235 additions and 286 deletions

View File

@@ -47,13 +47,13 @@ export class PyBox extends HTMLElement {
// now we need to set widths
this.widths = [];
const widthsAttr = getAttribute( this, "widths" );
const widthsAttr = getAttribute(this, 'widths');
if (widthsAttr) {
for (const w of widthsAttr.split(';')) {
if (w.includes('/')){
this.widths.push(w.split('/')[0])
}else{
this.widths.push(w)
if (w.includes('/')) {
this.widths.push(w.split('/')[0]);
} else {
this.widths.push(w);
}
}
} else {
@@ -63,7 +63,7 @@ export class PyBox extends HTMLElement {
this.widths.forEach((width, index) => {
const node: ChildNode = mainDiv.childNodes[index];
(<HTMLElement>node).style.flex = width;
addClasses((<HTMLElement>node), ['py-box-child']);
addClasses(<HTMLElement>node, ['py-box-child']);
});
this.appendChild(mainDiv);