mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-21 14:59:39 +00:00
Store shallowRef of litegraph canvas (#722)
* Store shallowRef of litegraph canvas * nit
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
import { LGraphNode, LGraphGroup } from '@comfyorg/litegraph'
|
||||
import { LGraphNode, LGraphGroup, LGraphCanvas } from '@comfyorg/litegraph'
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import { shallowRef } from 'vue'
|
||||
|
||||
export const useTitleEditorStore = defineStore('titleEditor', () => {
|
||||
const titleEditorTarget = ref<LGraphNode | LGraphGroup | null>(null)
|
||||
const titleEditorTarget = shallowRef<LGraphNode | LGraphGroup | null>(null)
|
||||
|
||||
return {
|
||||
titleEditorTarget
|
||||
}
|
||||
})
|
||||
|
||||
export const useCanvasStore = defineStore('canvas', () => {
|
||||
const canvas = shallowRef<LGraphCanvas | null>(null)
|
||||
|
||||
return {
|
||||
canvas
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user