filtered
c8ffacf172
[TS] Use strict mode in LGraph ( #579 )
...
* [TS] Undefined is not a valid object key
* Deprecate unused code
Adds ts-expect-error to TS strict issues on unmaintained public interfaces.
* [TS] Fix nullability: asSerialisable return type
* nit - Remove outdated comment
* [TS] Strict mode: LGraph
- Adds minor coercion changes; would need extremely specific hacks performed to result in runtime change
* [TMP] Work around typescript-strict-plugin
Must be reverted once plugin removed.
See #578
2025-02-24 11:12:46 +00:00
filtered
1800d31a5a
[Refactor] Prefer modern for..of loops 2 ( #569 )
...
* [Refactor] Prefer for..of
* [Refactor] Prefer for..of - manual refactoring
* Partially revert change - potential conflict
Not worth time investment to fix - reverted.
2025-02-23 16:36:52 -05:00
filtered
46535409c8
[CI] Fix existing lint warnings & disallow in future ( #567 )
...
* Fix lint warnings
* [CI] Fail lint checks instead of warning
* [CI] Fail stylistic lint checks instead of warning
2025-02-23 20:12:04 +00:00
filtered
4163cb04b8
[Refactor] Prefer modern for..of loops ( #566 )
...
- Replaces traditional incrementing `for` loops and `forEach()` calls with modern `for..of` syntax
- Improves readability
- Semantic checking used; not expecting issues to arise from this portion
2025-02-23 19:59:41 +00:00
Chenlei Hu
dc9a76200b
[BugFix] Call LGraphCanvas.deleteSelected on context menu remove ( #560 )
2025-02-20 15:22:53 -05:00
filtered
1dee497e40
Fix drag event throws introduced in #554 ( #555 )
2025-02-20 16:30:38 +11:00
filtered
b67f34e7f3
[Cleanup] Remove lint bypass, remove unused vars ( #554 )
2025-02-20 11:17:35 +11:00
Chenlei Hu
6b1e40a011
Add IColorable interface ( #549 )
...
* Add IColorable interface
* Set color option
* nit
* nit
* nit
2025-02-19 13:56:08 -05:00
Chenlei Hu
196645ce7e
Clear selectedItems on canvas clear ( #543 )
2025-02-18 11:49:06 -05:00
bymyself
e800eeb202
type selected_nodes ( #541 )
2025-02-18 11:48:54 -05:00
Chenlei Hu
9288709497
Trigger onSelectionChange on deleteSelected ( #539 )
2025-02-17 17:22:32 -05:00
Chenlei Hu
28e86820d6
Trigger LGraphCanvas.onSelectionChange on drag-select ( #537 )
2025-02-16 20:24:59 -05:00
Chenlei Hu
1e71da9a38
Show widget input inplace ( #535 )
...
* Show widget input inplace
* nit
* nit
2025-02-16 11:37:47 -05:00
Chenlei Hu
d23a320f9f
Upstream frontend widgets layout logic ( #531 )
...
* Upstream frontend widgets layout logic
* Add back LGraphNode.freeWidgetSpace
* nit
* update expectations
2025-02-14 19:22:37 -05:00
Chenlei Hu
a5c89c0152
[Performance] Avoid double measure on node rendering ( #529 )
...
* [Performance] Avoid double measure on node rendering
* Move _collapsed_width calc
* nit
* nit
* nit
* nit
* nit
2025-02-14 14:15:40 -05:00
Chenlei Hu
de10bf0c3a
[Cleanup] Remove LGraphCanvas.adjustNodesSize ( #528 )
2025-02-14 11:10:40 -05:00
Chenlei Hu
75267957d5
Use LGraphNode.setSize ( #527 )
2025-02-14 11:06:49 -05:00
Chenlei Hu
ce44cea409
Split layout and draw for slots ( #524 )
...
* Split layout and draw for slots
* nit
* nit
* Fix serialization
* Move effect (highlight/invalid) to layout calculation
* nit
* Fix type issue
* Resolve review comments
2025-02-13 20:20:57 -05:00
Chenlei Hu
361a1a76ef
Add LGraphNode.getExtraSlotMenuOptions hook ( #522 )
2025-02-12 15:52:27 -05:00
Chenlei Hu
9abcf0fd32
Remove LGraphNode.horizontal ( #521 )
...
* Remove LGraphNode.horizontal
* nit
2025-02-12 15:11:59 -05:00
Chenlei Hu
f0eca030c4
[BugFix] Trigger IWidget.callback on widget drag ( #514 )
2025-02-10 14:37:16 -05:00
Chenlei Hu
997d673bd9
[Refactor] LgraphNode.drawSlots ( #503 )
...
* wip
* nit
2025-02-09 12:53:41 -05:00
Chenlei Hu
048fa5bb88
[Refactor] NodeSlot.isValidTarget ( #501 )
2025-02-09 11:59:52 -05:00
Chenlei Hu
120c606f07
[Refactor] LGraphNode.drawCollapsedSlots ( #500 )
2025-02-09 11:02:20 -05:00
Chenlei Hu
01b8ae5bb8
[Refactor] LGraphNode.drawWidgets ( #499 )
2025-02-08 23:41:01 -05:00
Chenlei Hu
f26807f931
[Refactor] NodeSlot.drawCollapsed ( #498 )
2025-02-08 23:00:58 -05:00
Chenlei Hu
7472d1d9a1
[nit] Move labelPosition to NodeSlot.draw ( #497 )
2025-02-08 22:39:32 -05:00
Chenlei Hu
64fddc078c
[nit] Simplifiy node i/o slot loop ( #496 )
2025-02-08 22:35:18 -05:00
Chenlei Hu
7e76fd58a1
[nit] Use void return type on LGraphCanvas.drawNodeWidgets ( #495 )
2025-02-08 22:07:13 -05:00
Chenlei Hu
de74d8a08c
[Lint] Lint unused imports ( #493 )
2025-02-08 21:20:39 -05:00
Chenlei Hu
12f8d33b78
[Cleanup] Remove unused param on LGraphCanvas.drawWidgets ( #492 )
2025-02-08 19:30:16 -05:00
Chenlei Hu
4d36369cd8
Refactor widget switch statement ( #491 )
2025-02-08 19:28:38 -05:00
Chenlei Hu
64365acf7d
Revert "Revert "[Refactor] Update style ( #473 )" ( #487 )" ( #490 )
...
This reverts commit aa358403ac .
2025-02-08 18:29:54 -05:00
Chenlei Hu
aa358403ac
Revert "[Refactor] Update style ( #473 )" ( #487 )
...
This reverts commit c9f6b5ece8 .
2025-02-08 17:51:50 -05:00
Chenlei Hu
cdaceebcaa
Implement SliderWidget ( #485 )
2025-02-08 17:28:25 -05:00
Chenlei Hu
2d688a896d
Implement TextWidget ( #484 )
2025-02-08 17:01:54 -05:00
Chenlei Hu
ab14827f87
Implement ButtonWidget ( #483 )
2025-02-08 16:50:02 -05:00
Chenlei Hu
63f9f30eec
Implement NumberWidget ( #481 )
2025-02-08 15:45:23 -05:00
Chenlei Hu
c781053bd2
Implement ComboWidget ( #480 )
...
* wip
* Implement onClick
2025-02-08 15:16:15 -05:00
Chenlei Hu
fcc09c075d
Implement BooleanWidget.onClick ( #479 )
2025-02-08 12:45:51 -05:00
Chenlei Hu
790aac89f0
[Refactor] Move drawSlot to NodeSlot ( #477 )
...
* [Refactor] Move drawSlot to NodeSlot
* nit
2025-02-07 18:06:25 -05:00
Chenlei Hu
608b5f8342
Implement NodeSlot ( #476 )
...
* Implement NodeSlot
* nit
2025-02-07 17:13:32 -05:00
Chenlei Hu
75f067dbb3
Implement BooleanWidget ( #466 )
...
* Implement BooleanWidget
* Merge function of addWidget
* Class conversion
* nit
2025-02-07 17:10:30 -05:00
filtered
c9f6b5ece8
[Refactor] Update style ( #473 )
...
* Update #471 to use Point convention
* Prefer camel case var names
2025-02-07 07:38:28 +11:00
Chenlei Hu
be03fcc7d1
Upstream drag zoom feature from ComfyUI_frontend ( #471 )
2025-02-06 14:36:02 -05:00
Chenlei Hu
316efd6666
Support override of paste position on LGraphCanvas.pasteFromClipboard ( #468 )
2025-02-05 16:33:52 -05:00
Chenlei Hu
c900df750e
Simplify LGraphNode.onDrawBackground signature ( #463 )
2025-02-05 03:53:49 +11:00
Chenlei Hu
5acb656b15
[Refactor] Add LGraphCanvas.drawTitleText ( #462 )
2025-02-04 11:19:49 -05:00
Chenlei Hu
530fa874b0
[Refactor] Add LGraphNode.drawTitleBox ( #461 )
...
* [Refactor] Add LGraphNode.drawTitleBox
* nit
2025-02-04 10:57:50 -05:00
Chenlei Hu
7ea9a8405d
[Reland][Refactor] Move node title background draw logic to LGraphNode ( #459 )
...
* [Refactor] Move node title background draw logic to LGraphNode (#452 )
* Fix collapsed
2025-02-04 00:33:19 -05:00