From 043c4d5aa1c10972b2aea607096e2322f68c43d2 Mon Sep 17 00:00:00 2001 From: aki Date: Tue, 8 Apr 2025 00:25:01 +0800 Subject: [PATCH] chore: Unnecessary (at the moment) --- src/components/CompositeWidget.ts | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 src/components/CompositeWidget.ts diff --git a/src/components/CompositeWidget.ts b/src/components/CompositeWidget.ts deleted file mode 100644 index f2d242c..0000000 --- a/src/components/CompositeWidget.ts +++ /dev/null @@ -1,30 +0,0 @@ -// components/MergedWidget.ts -import { Widget } from './Widget'; - -export class MergedWidget extends Widget { - private children: Widget[] = []; - - constructor(sizeType: 'default' | 'icon' = 'default') { - super(sizeType); - } - - addWidget(widget: Widget): void { - this.children.push(widget); - } - - render(): HTMLElement { - // Clear current container contents (in case render is called more than once) - this.container.innerHTML = ''; - - for (const widget of this.children) { - const rendered = widget.render(); - - // Move child nodes (not the container itself) - while (rendered.firstChild) { - this.container.appendChild(rendered.firstChild); - } - } - - return this.container; - } -}