mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-13 17:10:06 +00:00
Standardise widgets - always initialize y to 0 (#2982)
This commit is contained in:
@@ -235,6 +235,7 @@ class ImagePreviewWidget implements ICustomWidget {
|
|||||||
readonly options: IWidgetOptions<unknown>
|
readonly options: IWidgetOptions<unknown>
|
||||||
// Dummy value to satisfy type requirements
|
// Dummy value to satisfy type requirements
|
||||||
value: string
|
value: string
|
||||||
|
y: number = 0
|
||||||
|
|
||||||
constructor(name: string, options: IWidgetOptions<unknown>) {
|
constructor(name: string, options: IWidgetOptions<unknown>) {
|
||||||
this.type = 'custom'
|
this.type = 'custom'
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ export class DOMWidgetImpl<T extends HTMLElement, V extends object | string>
|
|||||||
readonly element: T
|
readonly element: T
|
||||||
readonly options: DOMWidgetOptions<T, V>
|
readonly options: DOMWidgetOptions<T, V>
|
||||||
computedHeight?: number
|
computedHeight?: number
|
||||||
|
y: number = 0
|
||||||
callback?: (value: V) => void
|
callback?: (value: V) => void
|
||||||
|
|
||||||
readonly id: string
|
readonly id: string
|
||||||
|
|||||||
Reference in New Issue
Block a user