[Refactor] Rename hooks/ to composables/ (#2437)

This commit is contained in:
Chenlei Hu
2025-02-05 15:05:56 -05:00
committed by GitHub
parent c6ef107111
commit 6525ae7cf4
41 changed files with 40 additions and 34 deletions

View File

@@ -0,0 +1,27 @@
// @ts-strict-ignore
import {
ContextMenu,
DragAndScale,
LGraph,
LGraphBadge,
LGraphCanvas,
LGraphGroup,
LGraphNode,
LLink,
LiteGraph
} from '@comfyorg/litegraph'
/**
* Assign all properties of LiteGraph to window to make it backward compatible.
*/
export const useGlobalLitegraph = () => {
window['LiteGraph'] = LiteGraph
window['LGraph'] = LGraph
window['LLink'] = LLink
window['LGraphNode'] = LGraphNode
window['LGraphGroup'] = LGraphGroup
window['DragAndScale'] = DragAndScale
window['LGraphCanvas'] = LGraphCanvas
window['ContextMenu'] = ContextMenu
window['LGraphBadge'] = LGraphBadge
}