Skip to content

Commit d1573c9

Browse files
committed
✨ LGraphTheme
1 parent 78153fe commit d1573c9

File tree

12 files changed

+449
-105
lines changed

12 files changed

+449
-105
lines changed

GUIDE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,20 @@ this.setOutputData(0, {
402402
});
403403
```
404404

405+
### Event Bus
406+
TODO
405407

408+
### Progress / highlight
409+
TODO
406410

411+
### Dom Anchors
412+
TODO
413+
414+
### DOMWidget
415+
TODO
416+
417+
### Theme
418+
TODO
407419

408420

409421

apps/editor/src/main.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { LiteGraph } from "@litegraph-ts/core";
1+
import { LGraphTheme, LiteGraph } from "@litegraph-ts/core";
22
import Editor from "./Editor";
33
import configure from "./configure";
44

@@ -27,6 +27,14 @@ editor.graphCanvas.pause_rendering = false;
2727

2828
window["editor"] = editor;
2929
window["LiteGraph"] = LiteGraph;
30+
window["LGraphTheme"] = LGraphTheme;
31+
window["apply_theme"] = (theme: any) => {
32+
const t = new LGraphTheme(theme);
33+
t.apply({
34+
graph: editor.graph,
35+
canvas: editor.graphCanvas,
36+
});
37+
};
3038

3139
window.addEventListener("resize", () => {
3240
editor.graphCanvas.resize();

0 commit comments

Comments
 (0)