@@ -73,7 +73,6 @@ function extractConstituentOperatorsData(model) {
73
73
}
74
74
75
75
function extractOperatorData ( model ) {
76
-
77
76
const checkForCategory = ( category ) => model . syntax ?. content [ 0 ] . value . includes ( `[WorkflowElementCategory(ElementCategory.${ category } )]` ) ;
78
77
const checkInheritance = ( inheritance ) => model . inheritance ?. some ( inherited => inherited . uid . includes ( inheritance ) ) ;
79
78
source = checkForCategory ( 'Source' ) || checkInheritance ( 'Bonsai.Source' ) ;
@@ -83,19 +82,14 @@ function extractOperatorData(model) {
83
82
hub = checkInheritance ( 'OpenEphys.Onix1.MultiDeviceFactory' ) ;
84
83
configureDevice = checkInheritance ( 'OpenEphys.Onix1.SingleDeviceFactory' ) ;
85
84
type = model . uid . includes ( 'DeviceFactory' ) ? false : sink ? 'sink' : combinator ? 'combinator' : source ? 'source' : transform ? 'transform' : false ;
86
-
87
- if ( hub ) {
88
- model = model . __global . _shared [ '~/api/OpenEphys.Onix1.MultiDeviceFactory.yml' ] ;
89
- }
90
-
85
+ if ( hub ) { model = model . __global . _shared [ '~/api/OpenEphys.Onix1.MultiDeviceFactory.yml' ] ; }
91
86
overloads = model . children
92
87
. filter ( child => child . name [ 0 ] . value . includes ( 'Process' ) || child . name [ 0 ] . value . includes ( 'Generate' ) )
93
88
. map ( child => ( {
94
89
'overloadsDescription' : [ child . summary , child . remarks ] . join ( '' ) ,
95
90
'input' : [ child . syntax ?. parameters [ 0 ] . description , child . syntax ?. parameters [ 0 ] . remarks ] . join ( '' ) ,
96
91
'output' : [ child . syntax . return . description , child . syntax . return . remarks ] . join ( '' ) ,
97
92
} ) ) ;
98
-
99
93
return {
100
94
'type' : type ,
101
95
'hub' : hub ,
@@ -109,7 +103,7 @@ function extractOperatorData(model) {
109
103
* This method will be called at the start of exports.transform in ManagedReference.html.primary.js
110
104
*/
111
105
exports . preTransform = function ( model ) {
112
- if ( model . type === 'class' ) {
106
+ if ( model . type === 'class' || model . type === 'struct' ) {
113
107
operator = extractOperatorData ( model ) ;
114
108
if ( operator . hub ) {
115
109
properties = extractConstituentOperatorsData ( model ) ;
0 commit comments