Files
ComfyUI_frontend/src/stores/graphStore.ts
Chenlei Hu 974a7ef63f Store shallowRef of litegraph canvas (#722)
* Store shallowRef of litegraph canvas

* nit
2024-09-03 10:11:31 -04:00

20 lines
481 B
TypeScript

import { LGraphNode, LGraphGroup, LGraphCanvas } 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', () => {
const canvas = shallowRef<LGraphCanvas | null>(null)
return {
canvas
}
})