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.~~

![knob-node](https://github.com/user-attachments/assets/9d0ce70d-a220-49d0-987f-8dcef2b1d299)
This commit is contained in:
Miguel C
2025-02-26 14:07:32 -06:00
committed by GitHub
parent 963e4b0904
commit fbcc396880
3 changed files with 277 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import { BaseWidget } from "./BaseWidget"
import { BooleanWidget } from "./BooleanWidget"
import { ButtonWidget } from "./ButtonWidget"
import { ComboWidget } from "./ComboWidget"
import { KnobWidget } from "./KnobWidget"
import { NumberWidget } from "./NumberWidget"
import { SliderWidget } from "./SliderWidget"
import { TextWidget } from "./TextWidget"
@@ -20,6 +21,8 @@ export const WIDGET_TYPE_MAP: Record<string, WidgetConstructor> = {
// @ts-ignore #616
slider: SliderWidget,
// @ts-ignore #616
knob: KnobWidget,
// @ts-ignore #616
combo: ComboWidget,
// @ts-ignore #616
number: NumberWidget,