mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-23 16:24:06 +00:00
Trigger searchbox on group body db click (#731)
This commit is contained in:
@@ -164,6 +164,15 @@ const canvasEventHandler = (e: LiteGraphCanvasEvent) => {
|
||||
showSearchBox(e)
|
||||
} else if (e.detail.subType === 'empty-release') {
|
||||
handleCanvasEmptyRelease(e)
|
||||
} else if (e.detail.subType === 'group-double-click') {
|
||||
const group = e.detail.group
|
||||
const [x, y] = group.pos
|
||||
// @ts-expect-error LiteGraphCanvasEvent is not typed
|
||||
const relativeY = e.detail.originalEvent.canvasY - y
|
||||
// Show search box if the click is NOT on the title bar
|
||||
if (relativeY > group.titleHeight) {
|
||||
showSearchBox(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user