Resolved issues with history due to merges, opened a new pull request.
A more visual widget that the usual number/slider. Differentiates itself
from the functionality of a slider by not setting the value on click,
only stepping, emulating an actual knob.
- Left/Right takes 1 step at a time
- Up/Down moves 1% or 1 step, whichever is larger
- Move + Shift moves by 10% or 1 step, whichever is larger
This also includes a fixes to some size logic.
- [x] ~~Still missing being able to drag the knob itself, as the
clicking of the widget is not recognized if it's outside of where a
normal height widget would be.~~

Removes formatters' ability to print code that goes to a new line, but
uses no braces to delineate.
It becomes more difficult to follow when using JS-style indents (two
spaces).
No effort required - braces added by auto-fixer.
- Adds minor type coercions to resolve type errors
- Uses the same type-coercion behaviour of the target DOM object
properties
- Resolves a long-standing type issue in context menu interfaces
(converts to generic - `unknown` by default)
- Fixes several incorrect types
- Adds ts-ignore that must be removed later
Removed unused public methods (unmaintained, non-functional):
- bindEvents
- onMouse
`onredraw` is in use by extension authors.
This file now passes TS strict checks.
- Prefer comments above lines over end-of-line comments
- Makes auto-formatting easier
- Subjective, but it is generally easier to read in JS
- Standardises JSdoc format
- Auto-fixes for many issues (applies on save w/ESLint extension)
Reverts Comfy-Org/litegraph.js#601
Reason: breaks legacy reroute
On inserting a workflow with legacy reroute node
```
Uncaught (in promise) NullGraphError: Attempted to access LGraph reference that was null or undefined.
at RerouteNode.removeOutput (LGraphNode.ts:1425:28)
at RerouteNode.clone (rerouteNode.ts:215:18)
at LGraphCanvas.copyToClipboard (LGraphCanvas.ts:3331:29)
at Object.insertWorkflow (workflowService.ts:350:12)
```
- Guards against nullish `graph`
- [Fix regression in return type -
getInputLink](143ca5f3f2)
- long-standing, so no impact apparently
- Resolves some potential null dereferencing
- Part of effort to convert LGraphNode to TS strict
- Adds some small runtime changes - no impact expected, but it is
possible
- Runtime changes are in separate commits from compile-time type changes
- Risk of downstream impact is low
- Unused, loose typing
- Code search shows usage is limited to code copy & paste of litegraph
code
- So long as the `searchbox_extras` property exists and is empty, there
is no change to downstream consumers
* [API] Remove unused LiteGraph APIs
These features have not been maintained, and would require refactoring / rewrites. As code search revealed them to be unused, they are being removed.
- addNodeMethod
- compareObjects
- auto_sort_node_types
* Udpate API.md
* [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
- 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