File tree Expand file tree Collapse file tree 3 files changed +41
-31
lines changed Expand file tree Collapse file tree 3 files changed +41
-31
lines changed Original file line number Diff line number Diff line change @@ -40,23 +40,28 @@ export class QuickConnection {
4040 // Let's not popup the release on empty spot menu if we've released the mouse on a dot
4141 const origReleaseLink = LiteGraph . release_link_on_empty_shows_menu ;
4242 const origShowConnectionMenu = t . canvas . showConnectionMenu ;
43- if ( t . pointerUp ( ) ) {
44- if ( ! t . isComfyUI ) {
45- LiteGraph . release_link_on_empty_shows_menu = false ;
46- } else {
47- t . canvas . showConnectionMenu = ( ) => { } ;
43+
44+ let ret = null ;
45+ try {
46+ if ( t . pointerUp ( ) ) {
47+ if ( ! t . isComfyUI ) {
48+ LiteGraph . release_link_on_empty_shows_menu = false ;
49+ } else {
50+ t . canvas . showConnectionMenu = ( ) => { } ;
51+ }
52+ t . release_link_on_empty_shows_menu = false ;
4853 }
49- t . release_link_on_empty_shows_menu = false ;
50- }
51- const ret = origProcessMouseUp . apply ( this , arguments ) ;
52- if ( ! t . release_link_on_empty_shows_menu ) {
53- if ( ! t . isComfyUI ) {
54- LiteGraph . release_link_on_empty_shows_menu = origReleaseLink ;
55- } else {
56- t . canvas . showConnectionMenu = origShowConnectionMenu ;
57- t . canvas . linkConnector . reset ( ) ;
54+ ret = origProcessMouseUp . apply ( this , arguments ) ;
55+ } finally {
56+ if ( ! t . release_link_on_empty_shows_menu ) {
57+ if ( ! t . isComfyUI ) {
58+ LiteGraph . release_link_on_empty_shows_menu = origReleaseLink ;
59+ } else {
60+ t . canvas . showConnectionMenu = origShowConnectionMenu ;
61+ t . canvas . linkConnector . reset ( ) ;
62+ }
63+ t . release_link_on_empty_shows_menu = true ;
5864 }
59- t . release_link_on_empty_shows_menu = true ;
6065 }
6166 return ret ;
6267 } ;
Original file line number Diff line number Diff line change @@ -40,23 +40,28 @@ export class QuickConnection {
4040 // Let's not popup the release on empty spot menu if we've released the mouse on a dot
4141 const origReleaseLink = LiteGraph . release_link_on_empty_shows_menu ;
4242 const origShowConnectionMenu = t . canvas . showConnectionMenu ;
43- if ( t . pointerUp ( ) ) {
44- if ( ! t . isComfyUI ) {
45- LiteGraph . release_link_on_empty_shows_menu = false ;
46- } else {
47- t . canvas . showConnectionMenu = ( ) => { } ;
43+
44+ let ret = null ;
45+ try {
46+ if ( t . pointerUp ( ) ) {
47+ if ( ! t . isComfyUI ) {
48+ LiteGraph . release_link_on_empty_shows_menu = false ;
49+ } else {
50+ t . canvas . showConnectionMenu = ( ) => { } ;
51+ }
52+ t . release_link_on_empty_shows_menu = false ;
4853 }
49- t . release_link_on_empty_shows_menu = false ;
50- }
51- const ret = origProcessMouseUp . apply ( this , arguments ) ;
52- if ( ! t . release_link_on_empty_shows_menu ) {
53- if ( ! t . isComfyUI ) {
54- LiteGraph . release_link_on_empty_shows_menu = origReleaseLink ;
55- } else {
56- t . canvas . showConnectionMenu = origShowConnectionMenu ;
57- t . canvas . linkConnector . reset ( ) ;
54+ ret = origProcessMouseUp . apply ( this , arguments ) ;
55+ } finally {
56+ if ( ! t . release_link_on_empty_shows_menu ) {
57+ if ( ! t . isComfyUI ) {
58+ LiteGraph . release_link_on_empty_shows_menu = origReleaseLink ;
59+ } else {
60+ t . canvas . showConnectionMenu = origShowConnectionMenu ;
61+ t . canvas . linkConnector . reset ( ) ;
62+ }
63+ t . release_link_on_empty_shows_menu = true ;
5864 }
59- t . release_link_on_empty_shows_menu = true ;
6065 }
6166 return ret ;
6267 } ;
Original file line number Diff line number Diff line change 11[project ]
22name = " quick-connections"
33description = " Quick connections, Circuit board connections"
4- version = " 1.0.16 "
4+ version = " 1.0.17 "
55license = {text = " MIT License" }
66
77[project .urls ]
You can’t perform that action at this time.
0 commit comments