@@ -908,6 +908,7 @@ qx.Class.define("osparc.form.renderer.PropForm", {
908908 if ( ! this . __isPortAvailable ( toPortId ) ) {
909909 return false ;
910910 }
911+
911912 const ctrlLink = this . getControlLink ( toPortId ) ;
912913 ctrlLink . setEnabled ( false ) ;
913914 this . _form . getControl ( toPortId ) [ "link" ] = {
@@ -926,21 +927,28 @@ qx.Class.define("osparc.form.renderer.PropForm", {
926927 ctrlLink . addListener ( "mouseover" , ( ) => highlightEdgeUI ( true ) ) ;
927928 ctrlLink . addListener ( "mouseout" , ( ) => highlightEdgeUI ( false ) ) ;
928929
929- const workbench = study . getWorkbench ( ) ;
930- const fromNode = workbench . getNode ( fromNodeId ) ;
931- const port = fromNode . getOutput ( fromPortId ) ;
932- const fromPortLabel = port ? port . label : null ;
933- fromNode . bind ( "label" , ctrlLink , "value" , {
934- converter : label => label + ": " + fromPortLabel
935- } ) ;
936- // Hack: Show tooltip if element is disabled
937- const addToolTip = ( ) => {
938- ctrlLink . getContentElement ( ) . removeAttribute ( "title" ) ;
939- const toolTipText = fromNode . getLabel ( ) + ":\n" + fromPortLabel ;
940- ctrlLink . getContentElement ( ) . setAttribute ( "title" , toolTipText ) ;
941- } ;
942- fromNode . addListener ( "changeLabel" , ( ) => addToolTip ( ) ) ;
943- addToolTip ( ) ;
930+ const fromNode = study . getWorkbench ( ) . getNode ( fromNodeId ) ;
931+ const prettifyLinkString = ( ) => {
932+ const port = fromNode . getOutput ( fromPortId ) ;
933+ const fromPortLabel = port ? port . label : null ;
934+ fromNode . bind ( "label" , ctrlLink , "value" , {
935+ converter : label => label + ": " + fromPortLabel
936+ } ) ;
937+
938+ // Hack: Show tooltip if element is disabled
939+ const addToolTip = ( ) => {
940+ ctrlLink . getContentElement ( ) . removeAttribute ( "title" ) ;
941+ const toolTipText = fromNode . getLabel ( ) + ":\n" + fromPortLabel ;
942+ ctrlLink . getContentElement ( ) . setAttribute ( "title" , toolTipText ) ;
943+ } ;
944+ fromNode . addListener ( "changeLabel" , ( ) => addToolTip ( ) ) ;
945+ addToolTip ( ) ;
946+ }
947+ if ( fromNode . getMetadata ( ) ) {
948+ prettifyLinkString ( ) ;
949+ } else {
950+ fromNode . addListenerOnce ( "changeMetadata" , ( ) => prettifyLinkString ( ) , this ) ;
951+ }
944952
945953 this . __portLinkAdded ( toPortId , fromNodeId , fromPortId ) ;
946954
0 commit comments