mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-09 01:20:09 +00:00
Add setting to disable double click node title edit (#668)
This commit is contained in:
@@ -15,6 +15,9 @@ import { LGraphNode } from '@comfyorg/litegraph'
|
||||
import { ComfyExtension } from '@/types/comfy'
|
||||
import EditableText from '@/components/common/EditableText.vue'
|
||||
import { LiteGraph } from '@comfyorg/litegraph'
|
||||
import { useSettingStore } from '@/stores/settingStore'
|
||||
|
||||
const settingStore = useSettingStore()
|
||||
|
||||
const showInput = ref(false)
|
||||
const editedTitle = ref('')
|
||||
@@ -43,6 +46,10 @@ const extension: ComfyExtension = {
|
||||
const originalCallback = node.onNodeTitleDblClick
|
||||
|
||||
node.onNodeTitleDblClick = function (e: MouseEvent, ...args: any[]) {
|
||||
if (!settingStore.get('Comfy.Node.DoubleClickTitleToEdit')) {
|
||||
return
|
||||
}
|
||||
|
||||
currentNode.value = this
|
||||
editedTitle.value = this.title
|
||||
showInput.value = true
|
||||
|
||||
Reference in New Issue
Block a user