[Refactor] Move goToNode to litegraphService (#2101)

This commit is contained in:
Chenlei Hu
2024-12-30 16:38:10 -05:00
committed by GitHub
parent 3bf0dfd218
commit 9f23f81879
4 changed files with 15 additions and 10 deletions

View File

@@ -2060,12 +2060,6 @@ export class ComfyApp {
([p, o1, o2]) => (p + o1) * this.canvas.ds.scale + o2
) as Vector2
}
public goToNode(nodeId: NodeId) {
const graphNode = this.graph.getNodeById(nodeId)
if (!graphNode) return
this.canvas.animateToBounds(graphNode.boundingRect)
}
}
export const app = new ComfyApp()