Commit Graph

845 Commits

Author SHA1 Message Date
Chenlei Hu
fcca975cbd LGraphNode ES6 class conversion (#68)
Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
2024-08-11 10:06:46 -04:00
Chenlei Hu
f00b6b1b59 LLink ES6 class conversion (#67)
Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
2024-08-09 13:25:46 -04:00
Chenlei Hu
b0bcb0e062 Remove unnecessary compatibility layer (#66) 2024-08-09 13:18:51 -04:00
Chenlei Hu
c5b0327cfe 0.7.43 (#65) 2024-08-09 11:33:43 -04:00
Chenlei Hu
d531f8c4ae Add npm publish action (#64) 2024-08-09 11:32:18 -04:00
Chenlei Hu
16a3d384b6 ES6 class convertion of LGraph (#63)
* LGraph ES6 class conversion

* Add compatibility to prototype extension

* Add jest test action

---------

Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
2024-08-09 11:20:05 -04:00
bymyself
9b229220a3 centerOnNode use DPI (#49) 2024-08-06 13:36:08 -04:00
Chenlei Hu
73857f1930 Add GitHub action CI test (#59)
* Add GitHub action CI test

* Update package lock
2024-08-06 12:41:56 -04:00
Chenlei Hu
704b8e291e Remove legacy unused files (#57) 2024-08-06 11:50:35 -04:00
Chenlei Hu
dbbd072b43 Remove unused files (#56) 2024-08-06 11:38:35 -04:00
filtered
f937ff5ec5 Fix deselect delete (#51)
* Fix deselect per-node always fails silently

* Fix shift + drag node relying on broken deselect
2024-08-06 11:32:04 -04:00
Chenlei Hu
d2ef32fcb5 Fix Vite build (#55)
* Fix build output

* 0.7.37

* Fix type export

* 0.7.38

* Adjust build

* 0.7.39

* Add css to package declaration

* 0.7.40

* ESM style named export

* 0.7.41

* Fix style export for unit test

* 0.7.42
2024-08-06 10:56:57 -04:00
Chenlei Hu
25a2a6c5c9 0.7.36 (#54) 2024-08-06 09:36:53 -04:00
filtered
ddd1ac4f99 Add vite build (#53)
* Add vite build - baseline

* Fix build output folder structure

Matches pre-vite output

* Fix litegraph errors introduced by vite process

- Remove pre-written encapsulating iife (one is injected by vite)
- Replace all references to the global "this" with globalThis
2024-08-06 09:14:17 -04:00
filtered
d2c72243f8 Increase node input & output slot hitboxes (#45)
* Fix render bug - invalid slot shown as valid

* Increase hitbox of input/output slots

Improves UX by making wiring nodes easier.

* Add variable input hitbox width
2024-08-05 10:30:15 -04:00
filtered
c981b93084 Fix events not properly removed (#46)
Minor fix: someone forgot to finish their copy/paste, apparently.
2024-08-03 09:11:29 -04:00
Chenlei Hu
dbb174b083 0.7.35 (#43) 2024-07-31 10:58:15 -04:00
filtered
f88fe82445 Remove extremely inefficient test code (#42)
With this change, when moving the mouse in circles on empty ComfyUI background, CPU use and calls to drawNode are _significantly_ reduced.
2024-07-31 10:06:33 -04:00
bymyself
c2c4160af0 Use group font size from user (#41) 2024-07-30 20:33:49 -04:00
Chenlei Hu
daa33fad94 0.7.34 (#40)
* 0.7.33

* Fix types

* 0.7.34

* Update readme
2024-07-30 16:09:07 -04:00
Chenlei Hu
52bcf71e44 Relands #31 and #32 (#39)
* Add node disconnect shortcuts (#31)

* Fix loop break missing

* Fix logic - cannot reconnect AND disconnect

* Add ctrl + alt + click to disconnect nodes

Adds disconnect feature and very minor bug fixes (in separate commits):
- Ctrl + Alt + Click: Disconnect an input or output
- Ctrl + Alt + Click & Drag: Rewire any input/output to another node with a single click
- Added LiteGraph setting, on by default.

6036: skip_action = true

Not sure why skip_action was set to true, here.  It prevents disconnect and drag to a new output on the same click, so I've included it in the main commit.  Ideally, this should be controlled by a consumer hook, e.g. onDisconnectInput.

* Add output multi-link move using shift-click (#32)

When an output connects to multiple inputs, and you'd like to move all of those links to another node, you are currently required to drag each new link one by one.

This commit adds the ability to move everything at once, using Shift + Click (and drag).

It -does not- currently work with the drop to blank space + search for new node.  It will j ust rewire the first.  This can probably be fixed easily enough.

It -does- function with reroute nodes, however it requires that they are dropped onto the new output directly, not just anywhere on the node.  This is expected, really.

* Update empty-release event protocol

---------

Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
2024-07-30 15:11:13 -04:00
Chenlei Hu
6126ebc8dc Revert "Add node disconnect shortcuts (#31)" (#38)
This reverts commit 053caa4ccb.
2024-07-30 08:47:32 -04:00
Chenlei Hu
5bec26f4f2 Revert "Add output multi-link move using shift-click (#32)" (#37)
This reverts commit 3175828350.
2024-07-30 08:46:45 -04:00
Chenlei Hu
58c1f6ea32 0.7.32 (#36) 2024-07-29 21:36:27 -04:00
filtered
3175828350 Add output multi-link move using shift-click (#32)
When an output connects to multiple inputs, and you'd like to move all of those links to another node, you are currently required to drag each new link one by one.

This commit adds the ability to move everything at once, using Shift + Click (and drag).

It -does not- currently work with the drop to blank space + search for new node.  It will j ust rewire the first.  This can probably be fixed easily enough.

It -does- function with reroute nodes, however it requires that they are dropped onto the new output directly, not just anywhere on the node.  This is expected, really.
2024-07-28 21:15:13 -04:00
filtered
053caa4ccb Add node disconnect shortcuts (#31)
* Fix loop break missing

* Fix logic - cannot reconnect AND disconnect

* Add ctrl + alt + click to disconnect nodes

Adds disconnect feature and very minor bug fixes (in separate commits):
- Ctrl + Alt + Click: Disconnect an input or output
- Ctrl + Alt + Click & Drag: Rewire any input/output to another node with a single click
- Added LiteGraph setting, on by default.

6036: skip_action = true

Not sure why skip_action was set to true, here.  It prevents disconnect and drag to a new output on the same click, so I've included it in the main commit.  Ideally, this should be controlled by a consumer hook, e.g. onDisconnectInput.
2024-07-28 21:14:46 -04:00
Chenlei Hu
2c087519d7 0.7.31 (#35) 2024-07-28 14:06:31 -04:00
bymyself
299b9fbe95 Add ARIA attributes to contextmenu (#30) 2024-07-28 13:51:05 -04:00
bymyself
7504f3e017 Make node pin option text reactive (#29) 2024-07-28 13:50:27 -04:00
Chenlei Hu
8742788747 0.7.30 (#34) 2024-07-28 13:25:46 -04:00
Chenlei Hu
ea8a9effe5 Fix undefined var 'cloned' (#33) 2024-07-28 13:19:03 -04:00
Chenlei Hu
a86d8797c5 0.7.29 (#28) 2024-07-23 11:16:45 -04:00
Chenlei Hu
04946a6fc9 0.7.28 (#27) 2024-07-23 11:08:11 -04:00
Chenlei Hu
d746f04431 Fix var declaration (#26) 2024-07-23 11:06:36 -04:00
Chenlei Hu
6280fbf2c7 0.7.27 (#25)
* Update README

* 0.7.27
2024-07-23 10:50:56 -04:00
filtered
ee0b8a07b6 Fix empty input not used when connecting links (#24)
When dragging a link onto a node, it will always replace the first matching input type, unless you drop in the (respectively tiny) input hit box.

This commit fixes that, honouring the intended behaviour (preferFreeSlot is true in internal calls).
2024-07-21 11:09:17 -04:00
Chenlei Hu
10a30604f4 0.7.26 (#22)
* 0.7.26

* README update
2024-07-18 15:51:51 -04:00
Chenlei Hu
12fe34cf10 Sort node on serialization (#21) 2024-07-18 15:46:54 -04:00
bymyself
1fdf49fe85 Truncate overflowing combo widget text (#17)
* Truncate overflowing combo widget text

* Avoid uneccessary calls to

* Use unicode ellipsis

* Only measure first 3 chars
2024-07-18 15:46:01 -04:00
Chenlei Hu
ac8cb33ac1 0.7.25 (#15) 2024-07-07 23:22:02 -04:00
Chenlei Hu
1592ea97b4 Update types (#14) 2024-07-07 23:20:52 -04:00
Chenlei Hu
9b28af1800 0.7.24 (#13) 2024-07-07 18:35:57 -04:00
Chenlei Hu
6231ff5dcd Fix event content (#12) 2024-07-07 18:35:03 -04:00
Chenlei Hu
8e9a0898e5 Revert ESM change (#11) 2024-07-06 18:39:59 -04:00
Chenlei Hu
e361b39f36 Emit searchbox triggering canvas events (#10)
* Emit canvas event

* Update version
2024-07-06 18:13:26 -04:00
Chenlei Hu
2a935df408 Use ESM style export (#9)
* ESM style export

* Update version
2024-07-06 17:49:57 -04:00
Chenlei Hu
ebb0d19da1 Update README.md 2024-07-05 20:00:53 -04:00
Chenlei Hu
989aa51270 Update README.md 2024-07-05 20:00:05 -04:00
Chenlei Hu
7d211fa4d1 Update version (#8) 2024-07-05 19:51:13 -04:00
Chenlei Hu
ce7d0a67cd Fix zoom (#7) 2024-07-05 19:49:41 -04:00