mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-25 17:24:07 +00:00
* link release pops up searchbox by default (#348) * link release pops up searchbox by default * Update browser test * Fix tests * Update test expectations [skip ci] --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -44,9 +44,14 @@ const betaMenuEnabled = computed(
|
||||
const nodeSearchEnabled = computed<boolean>(
|
||||
() => settingStore.get('Comfy.NodeSearchBoxImpl') === 'default'
|
||||
)
|
||||
watch(nodeSearchEnabled, (newVal) => {
|
||||
if (comfyApp.canvas) comfyApp.canvas.allow_searchbox = !newVal
|
||||
})
|
||||
watch(
|
||||
nodeSearchEnabled,
|
||||
(newVal) => {
|
||||
LiteGraph.release_link_on_empty_shows_menu = !newVal
|
||||
if (comfyApp.canvas) comfyApp.canvas.allow_searchbox = !newVal
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
let dropTargetCleanup = () => {}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import { LiteGraphCanvasEvent, ConnectingLink } from '@comfyorg/litegraph'
|
||||
import { FilterAndValue } from '@/services/nodeSearchService'
|
||||
import { ComfyNodeDefImpl, useNodeDefStore } from '@/stores/nodeDefStore'
|
||||
import { ConnectingLinkImpl } from '@/types/litegraphTypes'
|
||||
import { LiteGraph } from '@comfyorg/litegraph'
|
||||
|
||||
interface LiteGraphPointerEvent extends Event {
|
||||
canvasX: number
|
||||
@@ -83,13 +84,6 @@ const addNode = (nodeDef: ComfyNodeDefImpl) => {
|
||||
}
|
||||
|
||||
const canvasEventHandler = (e: LiteGraphCanvasEvent) => {
|
||||
const shiftPressed = (e.detail.originalEvent as KeyboardEvent).shiftKey
|
||||
// Ignore empty releases unless shift is pressed
|
||||
// Empty release without shift is trigger right click menu
|
||||
if (e.detail.subType === 'empty-release' && !shiftPressed) {
|
||||
return
|
||||
}
|
||||
|
||||
if (e.detail.subType === 'empty-release') {
|
||||
const context = e.detail.linkReleaseContext
|
||||
if (context.links.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user