Remove double reroute pin (#548)

This commit is contained in:
Chenlei Hu
2024-08-19 21:38:41 -04:00
committed by GitHub
parent ea01fde607
commit 628f2afc34
3 changed files with 2 additions and 14 deletions

View File

@@ -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'

View File

@@ -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
})

View File

@@ -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