mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
Move marker property from BaseWidget to SliderWidget (#584)
* Move marker property from BaseWidget to SliderWidget * nit
This commit is contained in:
@@ -62,6 +62,7 @@ export interface ISliderWidget extends IBaseWidget {
|
|||||||
type?: "slider"
|
type?: "slider"
|
||||||
value: number
|
value: number
|
||||||
options: IWidgetSliderOptions
|
options: IWidgetSliderOptions
|
||||||
|
marker?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
/** A combo-box widget (dropdown, select, etc) */
|
/** A combo-box widget (dropdown, select, etc) */
|
||||||
@@ -122,7 +123,6 @@ export interface IBaseWidget<TElement extends HTMLElement = HTMLElement> {
|
|||||||
linkedWidgets?: IWidget[]
|
linkedWidgets?: IWidget[]
|
||||||
|
|
||||||
options: IWidgetOptions
|
options: IWidgetOptions
|
||||||
marker?: number
|
|
||||||
label?: string
|
label?: string
|
||||||
name?: string
|
name?: string
|
||||||
/** Widget type (see {@link TWidgetType}) */
|
/** Widget type (see {@link TWidgetType}) */
|
||||||
|
|||||||
@@ -7,9 +7,7 @@ import type { IBaseWidget, IWidget, IWidgetOptions, TWidgetType, TWidgetValue }
|
|||||||
export abstract class BaseWidget implements IBaseWidget {
|
export abstract class BaseWidget implements IBaseWidget {
|
||||||
linkedWidgets?: IWidget[]
|
linkedWidgets?: IWidget[]
|
||||||
options: IWidgetOptions<unknown>
|
options: IWidgetOptions<unknown>
|
||||||
marker?: number
|
|
||||||
label?: string
|
label?: string
|
||||||
clicked?: boolean
|
|
||||||
name?: string
|
name?: string
|
||||||
type?: TWidgetType
|
type?: TWidgetType
|
||||||
value?: TWidgetValue
|
value?: TWidgetValue
|
||||||
|
|||||||
@@ -10,12 +10,14 @@ export class SliderWidget extends BaseWidget implements ISliderWidget {
|
|||||||
declare type: "slider"
|
declare type: "slider"
|
||||||
declare value: number
|
declare value: number
|
||||||
declare options: IWidgetSliderOptions
|
declare options: IWidgetSliderOptions
|
||||||
|
marker?: number
|
||||||
|
|
||||||
constructor(widget: ISliderWidget) {
|
constructor(widget: ISliderWidget) {
|
||||||
super(widget)
|
super(widget)
|
||||||
this.type = "slider"
|
this.type = "slider"
|
||||||
this.value = widget.value
|
this.value = widget.value
|
||||||
this.options = widget.options
|
this.options = widget.options
|
||||||
|
this.marker = widget.marker
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user