mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 18:52:19 +00:00
[Cleanup] Remove unused hooks on DOMWidget (#2540)
This commit is contained in:
@@ -67,8 +67,6 @@ export interface DOMWidgetOptions<
|
|||||||
getMaxHeight?: () => number
|
getMaxHeight?: () => number
|
||||||
getHeight?: () => string | number
|
getHeight?: () => string | number
|
||||||
onDraw?: (widget: DOMWidget<T, V>) => void
|
onDraw?: (widget: DOMWidget<T, V>) => void
|
||||||
beforeResize?: (this: DOMWidget<T, V>, node: LGraphNode) => void
|
|
||||||
afterResize?: (this: DOMWidget<T, V>, node: LGraphNode) => void
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function intersect(a: Rect, b: Rect): Vector4 | null {
|
function intersect(a: Rect, b: Rect): Vector4 | null {
|
||||||
@@ -490,10 +488,8 @@ LGraphNode.prototype.addDOMWidget = function <
|
|||||||
this[SIZE] = true
|
this[SIZE] = true
|
||||||
const onResize = this.onResize
|
const onResize = this.onResize
|
||||||
this.onResize = function (size: Size) {
|
this.onResize = function (size: Size) {
|
||||||
options.beforeResize?.call(widget, this)
|
|
||||||
computeSize.call(this, size)
|
computeSize.call(this, size)
|
||||||
onResize?.call(this, size)
|
onResize?.call(this, size)
|
||||||
options.afterResize?.call(widget, this)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user