mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-08 06:30:04 +00:00
Knob (#600)
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.~~ 
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user