Skip to content

Commit

Permalink
✨ LGraphTheme
Browse files Browse the repository at this point in the history
  • Loading branch information
zhzLuke96 committed May 29, 2024
1 parent 78153fe commit d1573c9
Show file tree
Hide file tree
Showing 12 changed files with 449 additions and 105 deletions.
12 changes: 12 additions & 0 deletions GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,20 @@ this.setOutputData(0, {
});
```

### Event Bus
TODO

### Progress / highlight
TODO

### Dom Anchors
TODO

### DOMWidget
TODO

### Theme
TODO



Expand Down
10 changes: 9 additions & 1 deletion apps/editor/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LiteGraph } from "@litegraph-ts/core";
import { LGraphTheme, LiteGraph } from "@litegraph-ts/core";
import Editor from "./Editor";
import configure from "./configure";

Expand Down Expand Up @@ -27,6 +27,14 @@ editor.graphCanvas.pause_rendering = false;

window["editor"] = editor;
window["LiteGraph"] = LiteGraph;
window["LGraphTheme"] = LGraphTheme;
window["apply_theme"] = (theme: any) => {
const t = new LGraphTheme(theme);
t.apply({
graph: editor.graph,
canvas: editor.graphCanvas,
});
};

window.addEventListener("resize", () => {
editor.graphCanvas.resize();
Expand Down
Loading

0 comments on commit d1573c9

Please sign in to comment.