Standardise widgets - always initialize y to 0 (#2982)

This commit is contained in:
filtered
2025-03-12 02:31:03 +11:00
committed by GitHub
parent d4c3685326
commit 8fa970ffba
2 changed files with 2 additions and 0 deletions

View File

@@ -235,6 +235,7 @@ class ImagePreviewWidget implements ICustomWidget {
readonly options: IWidgetOptions<unknown>
// Dummy value to satisfy type requirements
value: string
y: number = 0
constructor(name: string, options: IWidgetOptions<unknown>) {
this.type = 'custom'

View File

@@ -69,6 +69,7 @@ export class DOMWidgetImpl<T extends HTMLElement, V extends object | string>
readonly element: T
readonly options: DOMWidgetOptions<T, V>
computedHeight?: number
y: number = 0
callback?: (value: V) => void
readonly id: string