Refactor, cleanup
This commit is contained in:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user