mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-22 03:35:31 -05:00
Format the TypeScript files (#877)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user