File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -49,12 +49,12 @@ export function getHardwareCategory(currentModule: commonStorage.Module) {
4949 name : 'Hardware' ,
5050 contents : [
5151 getRobotMechanismsBlocks ( currentModule ) ,
52- getComponentsBlocks ( currentModule ) ,
52+ getComponentsBlocks ( currentModule , false ) ,
5353 ]
5454 } ;
5555 }
5656 if ( currentModule . moduleType === commonStorage . MODULE_TYPE_MECHANISM ) {
57- return getComponentsBlocks ( currentModule ) ;
57+ return getComponentsBlocks ( currentModule , true ) ;
5858 }
5959 // Return default empty category if module type doesn't match
6060 return {
@@ -239,14 +239,16 @@ function getRobotMethodsBlocks(currentModule: commonStorage.Module) {
239239 } ;
240240}
241241
242- function getComponentsBlocks ( currentModule : commonStorage . Module ) {
242+ // This is called when the user is editing a mechanism or the robot and allows
243+ // the user to add a component or use an existing component.
244+ function getComponentsBlocks ( currentModule : commonStorage . Module , hideParams : boolean ) {
243245 const contents = [ ] ;
244246
245247 // Add the "+ Component" category
246248 contents . push ( {
247249 kind : 'category' ,
248250 name : '+ Component' ,
249- contents : getAllPossibleComponents ( true )
251+ contents : getAllPossibleComponents ( hideParams )
250252 } ) ;
251253
252254 // Get components from the current workspace
You can’t perform that action at this time.
0 commit comments