File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,10 @@ export class ChangeTracker {
160160 changeTracker ( ) . checkState ( ) ;
161161 } ) ;
162162
163+ api . addEventListener ( "graphCleared" , ( ) => {
164+ changeTracker ( ) . checkState ( ) ;
165+ } ) ;
166+
163167 // Handle litegraph clicks
164168 // @ts -ignore
165169 const processMouseUp = LGraphCanvas . prototype . processMouseUp ;
Original file line number Diff line number Diff line change @@ -706,6 +706,7 @@ export class ComfyUI {
706706 app . clean ( ) ;
707707 app . graph . clear ( ) ;
708708 app . resetView ( ) ;
709+ api . dispatchEvent ( new CustomEvent ( "graphCleared" ) ) ;
709710 }
710711 } ,
711712 } ) ,
Original file line number Diff line number Diff line change 11// @ts -nocheck
22
3+ import { api } from "../../api" ;
34import { $el } from "../../ui" ;
45import { downloadBlob } from "../../utils" ;
56import { ComfyButton } from "../components/button" ;
@@ -112,6 +113,7 @@ export class ComfyAppMenu {
112113 ) {
113114 app . clean ( ) ;
114115 app . graph . clear ( ) ;
116+ api . dispatchEvent ( new CustomEvent ( "graphCleared" ) ) ;
115117 }
116118 } ,
117119 } )
You can’t perform that action at this time.
0 commit comments