Commit Graph

1107 Commits

Author SHA1 Message Date
filtered
71f8a1decf Export Reroute class the same as other similar classes (#378)
* Export Reroute class the same as other similar classes

* Update test expectations
2024-12-15 10:54:50 -08:00
Chenlei Hu
8e21d44f5d 0.8.45 (#377) 2024-12-13 12:01:57 -08:00
Chenlei Hu
0048b5a0fe [i18n] Add INodeSlot.localized_name field (#376)
* [i18n] Add INodeSlot.localized_name field

* nit
2024-12-13 12:01:21 -08:00
filtered
1c1241bdb1 Optimise positionableItems / empty getters (#373)
* Optimise LGraph.empty() getter

* Optimise positionableItems getters

- No change to internal functionality
- Replaces forced spread of all items on every property access with generator function
- Consumers that require an array can very cleanly spread into one
2024-12-07 00:00:29 -05:00
Chenlei Hu
a7be883b97 0.8.44 (#372) 2024-12-06 17:53:43 -05:00
Chenlei Hu
a9940da05f Add LGraph.empty (#371) 2024-12-06 17:49:50 -05:00
Chenlei Hu
0d0dfafc5b 0.8.43 (#370) 2024-12-05 11:34:01 -05:00
filtered
1238f83728 Prevent distortion of area select rectangle (#368) 2024-12-05 11:33:51 -05:00
Chenlei Hu
c69bbdfb10 Export LGraphEventMode (#369) 2024-12-05 11:32:08 -05:00
Chenlei Hu
38227a9c96 0.8.42 (#365) 2024-12-01 20:32:35 -05:00
filtered
8cda1ac48a Add CanvasPointer callback for node widgets (#363)
* Add CanvasPointer callback for node widgets

* Add API documentation

* nit - Docs
2024-12-01 20:31:48 -05:00
pythongosssss
a0b50dcf15 Fix cloning pinned nodes (#364) 2024-12-01 20:31:12 -05:00
Chenlei Hu
2d6adf46e5 0.8.41 (#361) 2024-11-29 16:27:11 -05:00
filtered
91077aa20b Redesign invalid node indicator (#358)
* nit

* Remove unused code

Gradient can (and should) be impl. directly by caching a CanvasGradient.

* nit

* nit - Refactor

* Remove redundant code

* Add line width & colour options to shape stroke

* Rename drawSelectionBounding to strokeShape

* nit - Doc

* Fix rounded corners not scaling with padding

* Optimise node badge draw

* Redesign invalid node visual indication

Customisable boundary indicator now used, replacing red background.

* Update snapshot

---------

Co-authored-by: huchenlei <huchenlei@proton.me>
2024-11-29 16:26:25 -05:00
filtered
2a39b21578 Fix Zoom Centre (#135) 2024-11-28 11:54:09 -05:00
Chenlei Hu
eb54546ac9 0.8.40 (#357) 2024-11-28 09:50:29 -05:00
filtered
24db9e2572 Add maximum FPS feature (#356) 2024-11-28 09:45:59 -05:00
Chenlei Hu
16aea169ef 0.8.39 (#355) 2024-11-27 23:59:46 -05:00
Chenlei Hu
83ba7a8df7 Export ISerialisedGraph for frontend repo DTS (#354) 2024-11-27 23:50:16 -05:00
Chenlei Hu
e981fa01a0 Export types for frontend repo DTS (#353) 2024-11-27 22:13:59 -05:00
Chenlei Hu
8c0a868c9b 0.8.38 (#352) 2024-11-27 19:20:21 -05:00
filtered
304e229dc2 Fix custom widget pointerup receives NaN pos (#351) 2024-11-27 12:40:39 -05:00
Chenlei Hu
b8dbca529d 0.8.37 (#350) 2024-11-26 13:06:35 -05:00
filtered
f6e885f015 Ensure click_time is available to custom widgets (#349) 2024-11-26 13:05:47 -05:00
filtered
ffa2a24cb1 Fix slider regression caused by CanvasPointer (#347) 2024-11-26 13:05:24 -05:00
Chenlei Hu
c61b08af8f 0.8.36 (#344) 2024-11-25 11:06:40 -05:00
filtered
e35748faa4 Fix widget.mouse callback does not receive pointerup events (#342)
* Provide pointerup events to widget.mouse callback

* Fix regression in widget mouse cb

pointerup events are now sent to mouse() callback regardless of CanvasPointer state.
2024-11-25 11:05:50 -05:00
filtered
a95d8ebc87 Fix invalid callback return value preventing canvas redraw (#343)
* Fix invalid callback prevents redraw

When widget.mouse() is incorrectly implemented (no return value), it evaluates as falsy and prevents canvas redraw.

Changes default behaviour to ignore the return value when nullish.

* Fix pointermove for custom widget outside nodes

Events are now also sent when the pointer moves outside the bounds of the node.
2024-11-25 10:43:28 -05:00
Chenlei Hu
2fae2fa0c0 0.8.35 (#340) 2024-11-23 17:45:17 -05:00
filtered
696b8b2c63 Fix custom widget mouseover (#339) 2024-11-23 17:44:13 -05:00
Chenlei Hu
5807c90161 0.8.34 (#336) 2024-11-22 10:59:14 -05:00
filtered
2d69a87419 Use device scaling for drag-from-link checks (#334) 2024-11-22 10:57:37 -05:00
filtered
a6c3f5c1c7 Fix widget changed callback not called (#333) 2024-11-22 10:48:35 -05:00
filtered
ae6422bad1 Fix custom widgets not receiving pointermove events (#335) 2024-11-22 10:45:39 -05:00
Chenlei Hu
1f572b41f1 0.8.33 (#332) 2024-11-21 14:13:04 -05:00
filtered
75960485d3 Snapsize (#331)
* Improve group resize UX

Removes the teleport of the group corner to the pointer, on the first move event.

* Select groups when clicking titles

* Add snap to grid for groups

* Apply new group resize UX to nodes
2024-11-21 14:11:38 -05:00
Chenlei Hu
db8e1731c1 0.8.32 (#330) 2024-11-21 10:20:00 -05:00
filtered
ee45593558 Move Snap to Grid control to LiteGraphGlobal (#329)
* Fix snap to grid - now toggled at app level

Was impl. as per workflow.

* Update test expectations
2024-11-21 10:19:00 -05:00
filtered
f79133659f Clean up JSDoc (#327)
* Convert comments to JSDoc

* Clean JSdoc

* nit

* Clean up all JSDoc & ESLint warnings

Disables max-len for now
Removes redundant JSDoc tags (empty, same name, wrong name, etc)
2024-11-21 10:11:53 -05:00
Chenlei Hu
0263704c6c Disable slow jest tests (#328) 2024-11-21 09:43:32 -05:00
filtered
5469bfdd52 Add ESLint, pre-commit hook & format all files (#319)
* Add ESLint config

* Add ESLint packages

* Add prettier config

* Fix ESLint package version

* Format all files

* Format static assets

* Format project root config

* Add pre-commit code formatting

Formats .css & .js files automatically.  If any .ts or .mts files are staged, the entire project is type-checked.

Packages:
- lint-staged
- husky
- prettier
2024-11-20 21:50:58 -05:00
Chenlei Hu
69b1c86278 0.8.31 (#325) 2024-11-20 09:29:30 -05:00
filtered
b4b68c7e75 Fix fast widget conversion (#323) 2024-11-20 09:28:33 -05:00
Chenlei Hu
62955441a0 0.8.30 (#322) 2024-11-19 19:50:21 -05:00
filtered
ecb7fa4f0b Fix widget not updating on combo click (#321) 2024-11-19 18:26:36 -05:00
filtered
31c25b4ea1 Fixes pinned group contents moving (#316) 2024-11-18 13:17:24 -05:00
pythongosssss
1bec315427 Adds highlight to advanced widgets (#317)
* Adds highlight to advanced widgets

* Update snapshot
2024-11-18 13:16:52 -05:00
Chenlei Hu
a23da8eb17 0.8.29 (#318) 2024-11-18 10:13:05 -05:00
filtered
c0e8b33716 Snap everything to grid (#315)
* Implement snap to grid

- Moves positioning logic to LGraph
- Simplifies code
- Adds Pointer API to alt-clone node
- Removes always_round_positions, replaced by always snap to grid (default size is 1 when always snapping)

Fix refator error

* Fix group items snapped without group

* Allow snapping of all items

- Add snapToGrid to Positionable
- Impl. on all types
- Deprecated: alignToGrid is now a wrapper

* Fix test import alias, update expectations

* Prevent desync of before / after change events

Adds ability to perform late binding of finally() during drag start.

* nit - Refactor

* Fix unwanted snap on node/group add

* nit - Doc

* Add shift key state tracking for snap to grid

Private impl., no state API as yet.

* Add snap guides rendering

Nodes, reroutes

* Optimisation - reroute rendering

 Fixes exponential redraw

* Add snap guidelines for groups
2024-11-18 10:12:20 -05:00
Chenlei Hu
3e50941ce3 0.8.28 (#313) 2024-11-16 18:46:08 -05:00