Refactor, cleanup
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
moveCursorIntoText,
|
||||
} from "./widget_util.ts";
|
||||
import { expandMarkdown } from "../markdown.ts";
|
||||
import { LuaStackFrame, LuaTable } from "../space_lua/runtime.ts";
|
||||
import { LuaStackFrame, LuaTable } from "../../lib/space_lua/runtime.ts";
|
||||
import { isBlockMarkdown, jsonToMDTable } from "../markdown_util.ts";
|
||||
import { activeWidgets } from "./code_widget.ts";
|
||||
|
||||
@@ -55,6 +55,11 @@ export class LuaWidget extends WidgetType {
|
||||
super();
|
||||
}
|
||||
|
||||
override get estimatedHeight(): number {
|
||||
const cacheItem = this.client.getWidgetCache(this.cacheKey);
|
||||
return cacheItem ? cacheItem.height : -1;
|
||||
}
|
||||
|
||||
toDOM(): HTMLElement {
|
||||
const wrapperSpan = document.createElement("span");
|
||||
wrapperSpan.className = "sb-lua-wrapper";
|
||||
@@ -260,11 +265,6 @@ export class LuaWidget extends WidgetType {
|
||||
return container;
|
||||
}
|
||||
|
||||
override get estimatedHeight(): number {
|
||||
const cacheItem = this.client.getWidgetCache(this.cacheKey);
|
||||
return cacheItem ? cacheItem.height : -1;
|
||||
}
|
||||
|
||||
override eq(other: WidgetType): boolean {
|
||||
return (
|
||||
other instanceof LuaWidget &&
|
||||
|
||||
Reference in New Issue
Block a user