@@ -157,7 +157,20 @@ class Editor {
157157 } ) ) ;
158158 }
159159
160+ public getNodeName ( nodeType : string ) : string {
161+ if ( nodeType === 'basic.input' ) {
162+ return 'Input' ;
163+ } else if ( nodeType === 'basic.output' ) {
164+ return 'Output' ;
165+ } else if ( nodeType === 'basic.constant' ) {
166+ return 'Parameter' ;
167+ } else if ( nodeType === 'basic.code' ) {
168+ return 'Code' ;
169+ }
160170
171+ return nodeType ;
172+ }
173+
161174
162175
163176 public getGInputsOutput ( ) : [ { indexOne : number , label : string , id :string } [ ] , { indexTwo : number , label : string , id :string } [ ] ] {
@@ -181,9 +194,9 @@ class Editor {
181194 let label = `` ;
182195 var id = `${ options . id } :${ portOptions . label } :${ linkIds } ` ;
183196 if ( node . getType ( ) == 'block.package' ) {
184- label = `${ node . getType ( ) } -> : ${ options . info . name } : ${ portOptions . label } ` ;
197+ label = `${ options . info . name } -> : ${ portOptions . label } ` ;
185198 } else {
186- label = `${ node . getType ( ) } -> : ${ portOptions . label } ` ;
199+ label = `${ this . getNodeName ( node . getType ( ) ) } -> : ${ portOptions . label } ` ;
187200 }
188201 valueOne . push ( { indexOne, label, id } ) ;
189202 }
@@ -193,9 +206,9 @@ class Editor {
193206 let label = `` ;
194207 var id = `${ options . id } :${ portOptions . label } :${ linkIds } ` ;
195208 if ( node . getType ( ) == 'block.package' ) {
196- label = `${ node . getType ( ) } -> : ${ options . info . name } : ${ portOptions . label } ` ;
209+ label = `${ options . info . name } -> : ${ portOptions . label } ` ;
197210 } else {
198- label = `${ node . getType ( ) } -> : ${ portOptions . label } ` ;
211+ label = `${ this . getNodeName ( node . getType ( ) ) } -> : ${ portOptions . label } ` ;
199212 }
200213 valueTwo . push ( { indexTwo, label, id } ) ;
201214 }
0 commit comments