Files
ComfyUI_frontend/src/stores/graphStore.ts
2024-12-30 17:26:37 -05:00

25 lines
585 B
TypeScript

import { LGraphCanvas, LGraphGroup, LGraphNode } from '@comfyorg/litegraph'
import { defineStore } from 'pinia'
import { shallowRef } from 'vue'
export const useTitleEditorStore = defineStore('titleEditor', () => {
const titleEditorTarget = shallowRef<LGraphNode | LGraphGroup | null>(null)
return {
titleEditorTarget
}
})
export const useCanvasStore = defineStore('canvas', () => {
/**
* The LGraphCanvas instance.
*
* The root LGraphCanvas object is shallow reactive.
*/
const canvas = shallowRef<LGraphCanvas | null>(null)
return {
canvas
}
})