mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-26 09:19:43 +00:00
Implement a legacy canvas widget for vue mode (#6011)
 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6011-Implement-a-legacy-canvas-widget-for-vue-mode-2896d73d36508127a5d1debcccb519a0) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
@@ -2801,7 +2801,7 @@ export class LGraphCanvas
|
||||
// Widget
|
||||
const widget = node.getWidgetOnPos(x, y)
|
||||
if (widget) {
|
||||
this.#processWidgetClick(e, node, widget)
|
||||
this.processWidgetClick(e, node, widget)
|
||||
this.node_widget = [node, widget]
|
||||
} else {
|
||||
// Node background
|
||||
@@ -2981,13 +2981,12 @@ export class LGraphCanvas
|
||||
this.dirty_canvas = true
|
||||
}
|
||||
|
||||
#processWidgetClick(
|
||||
processWidgetClick(
|
||||
e: CanvasPointerEvent,
|
||||
node: LGraphNode,
|
||||
widget: IBaseWidget
|
||||
widget: IBaseWidget,
|
||||
pointer = this.pointer
|
||||
) {
|
||||
const { pointer } = this
|
||||
|
||||
// Custom widget - CanvasPointer
|
||||
if (typeof widget.onPointerDown === 'function') {
|
||||
const handled = widget.onPointerDown(pointer, node, this)
|
||||
|
||||
Reference in New Issue
Block a user