mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 00:50:05 +00:00
Remove double reroute pin (#548)
This commit is contained in:
@@ -37,7 +37,7 @@ test.describe('Node search box', () => {
|
||||
await comfyPage.disconnectEdge()
|
||||
// Select the second item as the first item is always reroute
|
||||
await comfyPage.searchBox.fillAndSelectFirstNode('CLIPTextEncode', {
|
||||
suggestionIndex: 1
|
||||
suggestionIndex: 0
|
||||
})
|
||||
await expect(comfyPage.canvas).toHaveScreenshot('auto-linked-node.png')
|
||||
})
|
||||
@@ -59,7 +59,7 @@ test.describe('Node search box', () => {
|
||||
|
||||
// Select the second item as the first item is always reroute
|
||||
await comfyPage.searchBox.fillAndSelectFirstNode('Load Checkpoint', {
|
||||
suggestionIndex: 1
|
||||
suggestionIndex: 0
|
||||
})
|
||||
await expect(comfyPage.canvas).toHaveScreenshot(
|
||||
'auto-linked-node-batch.png'
|
||||
|
||||
@@ -81,11 +81,6 @@ const props = defineProps({
|
||||
searchLimit: {
|
||||
type: Number,
|
||||
default: 64
|
||||
},
|
||||
// TODO: Find a more flexible mechanism to add pinned nodes
|
||||
includeReroute: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -100,9 +95,6 @@ const placeholder = computed(() => {
|
||||
const search = (query: string) => {
|
||||
currentQuery.value = query
|
||||
suggestions.value = [
|
||||
...(props.includeReroute
|
||||
? [useNodeDefStore().nodeDefsByName['Reroute']]
|
||||
: []),
|
||||
...useNodeDefStore().nodeSearchService.searchNode(query, props.filters, {
|
||||
limit: props.searchLimit
|
||||
})
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
<template #container>
|
||||
<NodeSearchBox
|
||||
:filters="nodeFilters"
|
||||
:includeReroute="includeReroute"
|
||||
@add-filter="addFilter"
|
||||
@remove-filter="removeFilter"
|
||||
@add-node="addNode"
|
||||
@@ -62,7 +61,6 @@ const getNewNodeLocation = (): [number, number] => {
|
||||
return [originalEvent.canvasX, originalEvent.canvasY]
|
||||
}
|
||||
const nodeFilters = reactive([])
|
||||
const includeReroute = ref(false)
|
||||
const addFilter = (filter: FilterAndValue) => {
|
||||
nodeFilters.push(filter)
|
||||
}
|
||||
@@ -102,7 +100,6 @@ const linkReleaseTriggerMode = computed(() => {
|
||||
})
|
||||
|
||||
const canvasEventHandler = (e: LiteGraphCanvasEvent) => {
|
||||
includeReroute.value = false
|
||||
const shiftPressed = (e.detail.originalEvent as KeyboardEvent).shiftKey
|
||||
|
||||
if (e.detail.subType === 'empty-release') {
|
||||
@@ -126,7 +123,6 @@ const canvasEventHandler = (e: LiteGraphCanvasEvent) => {
|
||||
)
|
||||
const dataType = firstLink.type
|
||||
addFilter([filter, dataType])
|
||||
includeReroute.value = true
|
||||
}
|
||||
triggerEvent.value = e
|
||||
visible.value = true
|
||||
|
||||
Reference in New Issue
Block a user