Skip to content

Commit

Permalink
Re-enable tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei committed Jun 14, 2024
1 parent c9b1015 commit 03cf280
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"build": "tsc && vite build",
"test": "cd tests-ui && npm run test",
"preview": "vite preview"
},
Expand Down
3 changes: 3 additions & 0 deletions src/scripts/domWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ function computeSize(size: [number, number]): void {

// Override the compute visible nodes function to allow us to hide/show DOM elements when the node goes offscreen
const elementWidgets = new Set();
//@ts-ignore
const computeVisibleNodes = LGraphCanvas.prototype.computeVisibleNodes;
//@ts-ignore
LGraphCanvas.prototype.computeVisibleNodes = function (): LGraphNode[] {
const visibleNodes = computeVisibleNodes.apply(this, arguments);
for (const node of app.graph._nodes) {
Expand Down Expand Up @@ -228,6 +230,7 @@ export function addDomClippingSetting(): void {
});
}

//@ts-ignore
LGraphNode.prototype.addDOMWidget = function (
name: string,
type: string,
Expand Down

0 comments on commit 03cf280

Please sign in to comment.