Commit Graph

1116 Commits

Author SHA1 Message Date
filtered
3f9fb421d0 Always create cloned, separate subgraph definintions (#1133) 2025-07-18 19:53:48 +00:00
Christian Byrne
ca5774c0df [feat] Add subgraph test infrastructure (#1111) 2025-07-15 07:53:26 -07:00
filtered
d60d9485f3 Fix cannot check widget value if undefined (#1116) 2025-07-12 08:51:04 +10:00
filtered
6134452891 Return SubgraphNode widget values during execution (#1114) 2025-07-11 09:45:20 +00:00
filtered
a70bcb048c Improve execution logic using shared DTO map (#1112) 2025-07-11 00:11:50 -07:00
Christian Byrne
3db44707fa [fix] Clean up slot references when removing widgets (#1107) 2025-07-07 23:14:35 -07:00
filtered
e93da6bce4 Hide widget values when computedDisabled is true (#1109) 2025-07-07 21:04:58 -07:00
AustinMroz
6ae6a05b14 Add fallback for virtual nodes that redirect links (#1102) 2025-07-06 13:01:56 +00:00
filtered
fe57458a66 [TS] Update callbacks using CanvasMouseEvent (#1104) 2025-07-05 10:52:25 -07:00
guill
5eac669b41 Fix a bug that prevented subgraph reuse (#1103) 2025-07-04 15:11:11 -07:00
filtered
8b8f38f4de Widget promotion (#1100) 2025-07-02 17:49:15 -07:00
filtered
f9cf25ad82 Add subgraph IO change event handlers (#1096) 2025-07-01 12:58:28 -07:00
filtered
c846ab80ae Add events for Subgraph input/output changes (#1094) 2025-07-01 12:36:41 -07:00
filtered
eb93bb3c22 Fix control + mouse-wheel zoom in trackpad mode (#1093) 2025-07-01 17:06:10 +00:00
filtered
b5a9cbcc16 [Test] Fix auto-format file breaks module (#1089) 2025-06-28 16:20:03 -07:00
filtered
cab707a32c [Test] Fix circular test imports in CI (#1088) 2025-06-28 15:30:42 -07:00
filtered
7378c858bd Fix lint errors (#1087) 2025-06-28 15:25:04 -07:00
filtered
bcaaa00770 Add Subgraphs (#1000) 2025-06-28 15:21:56 -07:00
filtered
3e7f9627b4 Fix pointer does not reset when moving out of group resize corner (#1084) 2025-06-26 10:04:27 -07:00
filtered
b17dc296ab [CodeHealth] Add debug logging on disconnect fail (#1078) 2025-06-12 22:36:12 -07:00
filtered
d225e77d30 Fix custom widgets with draw may break rendering (#1072) 2025-06-03 06:00:02 -07:00
filtered
ee2171b6ce Fix node resize cursor flicker (#1070) 2025-05-28 07:34:04 +00:00
filtered
273eae1e8d Fix custom widget drawWidget never called (#1068) 2025-05-28 10:12:13 +10:00
filtered
b86f2b58e6 Remove node edge resize (#1066) 2025-05-26 22:10:41 +00:00
filtered
71928af112 Allow node resize from any corner or edge (#1063) 2025-05-26 06:36:03 +00:00
filtered
d1ec780dbd Add rectangle resize methods, use in DragAndScale (#1057) 2025-05-16 17:22:51 +00:00
filtered
f5b3036b6c [API] Add DragAndScale onChanged callback (#1055) 2025-05-16 15:50:45 +00:00
filtered
de21f5ccd3 Fix unnecessary module loading for type imports (#1053) 2025-05-15 23:16:27 +00:00
filtered
19b7d28d97 [API] Add dirty state flag for selectedItems (#1050) 2025-05-15 19:33:51 +10:00
filtered
ad528461c9 [API] Deprecate node.captureInput (#1049) 2025-05-15 06:58:46 +00:00
filtered
de32560816 [TS] Improve types and (#1043) 2025-05-12 19:02:57 +00:00
filtered
10118d95e3 Export the viewport offset and scale with the graph (#1042) 2025-05-12 18:47:10 +00:00
filtered
c2a88d3088 [Refactor] Use Rectangle for canvas visible area (#1041) 2025-05-12 11:01:36 +00:00
filtered
6ff80cfd36 [Cleanup] Fix node background drawn twice / misc (#1040) 2025-05-10 14:47:48 +00:00
filtered
d452240936 [TS] Declare missing types in BaseWidget (#1038) 2025-05-09 06:37:59 +00:00
filtered
441f14c12e [TS] Fix callback type prevents use as method (#1035) 2025-05-09 10:34:45 +10:00
Chenlei Hu
2405be993c Add DragAndScale.fitToBounds (#1033) 2025-05-08 13:55:11 -04:00
filtered
3fec0e2d39 Fix explicit undefined interpreted as text by consumers (#1031) 2025-05-08 09:26:55 +10:00
filtered
4f9a40dcfd Fix downstream DOM widget impl. crash on load (#1029) 2025-05-08 08:54:07 +10:00
filtered
1b37502d70 [API] Improve widget typing (#1027) 2025-05-08 06:37:16 +10:00
filtered
44c98fbf62 Rename widget _displayValue to resolve conflict (#1025) 2025-05-07 22:36:40 +10:00
filtered
86d1c2a93a Workaround crash on load from custom nodes (#1023) 2025-05-07 21:18:42 +10:00
filtered
ccbdff0ad1 Fix Rectangle subarray end offset logic (#1021) 2025-05-06 18:10:59 +00:00
filtered
df6e4debb5 Fix widget snap to work with input sockets (#1017) 2025-05-07 02:02:49 +10:00
filtered
c6df437662 [CodeHealth] Replace temporary TS conversion widget types (#1019) 2025-05-06 19:53:49 +10:00
filtered
a74df42cce Fix Rectangle.size exception on access (#1013) 2025-05-06 19:28:51 +10:00
filtered
28434e7165 Fix node with any widgets bypasses link validation (#1016)
- Followup on #891
2025-05-06 09:10:35 +00:00
filtered
c344a73739 [API] Export widget classes for downstream use (#1018)
Exports all widget classes.

- BaseSteppedWidget
- BaseWidget
- BooleanWidget
- ButtonWidget
- ComboWidget
- KnobWidget
- NumberWidget
- SliderWidget
- TextWidget
2025-05-06 06:50:17 +10:00
filtered
75df19521b Widget overhaul (#1010)
### Widget text overhaul

#### Current
- Numbers and text overlap
- Combo boxes truncate the value before the label

![image](https://github.com/user-attachments/assets/c991b0b6-879f-4455-92d4-4254ef25b55c)

#### Proposed

**By default, widgets will now truncate their labels before their
values.**


https://github.com/user-attachments/assets/296ea5ab-d2ff-44f2-9139-5d97789e4f12

- Changes the way widget text is rendered, calculated, and truncated
- Truncation now applies in a standard way to the following widgets:
  - Text
  - Combo
  - Number
- Centralises widget draw routines in base class

### Config

```ts
// Truncate **both** widgets and labels evenly
LiteGraph.truncateWidgetTextEvenly = true

// Swap the default from truncating labels before values, to truncating values first (restores legacy behaviour)
// truncateWidgetTextEvenly **must** be `false`.
LiteGraph.truncateWidgetValuesFirst = true
```

### API / interfaces  

- Adds rich `Rectangle` concrete impl., with many methods and helpful
accessors (e.g. `right`, `bottom`)
- Actually _improves_ performance due to switch from Float32Array to
Float64Array
- Impact vs plain Float64Array was not detectable outside of a 2M+
instantiation-loop with random data
  - Lazy `pos` & `size` `subarray` properties
- Adds `ReadOnlySize`
- Adds higher-level text draw functions to abstract the nitty gritty in
a performant way (binary search)

- Resolves Comfy-Org/ComfyUI_frontend/issues/457
2025-05-05 10:48:06 +10:00
filtered
386f18a1e5 Remove DragAndScale rounding when using trackpad (#1009)
Fixes issue where pinch to zoom would jitter around scale 1 - D&S rounds
the value to exactly 1 when it is "close enough". Good for pointer, poor
UX for precision trackpad.
2025-05-04 21:06:43 +00:00