Refactor, cleanup

This commit is contained in:
Zef Hemel
2025-06-12 20:30:01 +02:00
parent b942ebabad
commit 8d3dc4cc4e
120 changed files with 1139 additions and 1101 deletions
+6 -6
View File
@@ -19,6 +19,12 @@ export class IFrameWidget extends WidgetType {
super();
}
override get estimatedHeight(): number {
const cachedHeight = this.client.getCachedWidgetHeight(this.bodyText);
// console.log("Calling estimated height", this.bodyText, cachedHeight);
return cachedHeight > 0 ? cachedHeight : 150;
}
toDOM(): HTMLElement {
const from = this.from;
const iframe = createWidgetSandboxIFrame(
@@ -67,12 +73,6 @@ export class IFrameWidget extends WidgetType {
return iframe;
}
override get estimatedHeight(): number {
const cachedHeight = this.client.getCachedWidgetHeight(this.bodyText);
// console.log("Calling estimated height", this.bodyText, cachedHeight);
return cachedHeight > 0 ? cachedHeight : 150;
}
override eq(other: WidgetType): boolean {
return (
other instanceof IFrameWidget &&