Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/toolbox/hardware_category.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ export function getHardwareCategory(currentModule: commonStorage.Module) {
name: 'Hardware',
contents: [
getRobotMechanismsBlocks(currentModule),
getComponentsBlocks(currentModule),
getComponentsBlocks(currentModule, false),
]
};
}
if (currentModule.moduleType === commonStorage.MODULE_TYPE_MECHANISM) {
return getComponentsBlocks(currentModule);
return getComponentsBlocks(currentModule, true);
}
// Return default empty category if module type doesn't match
return {
Expand Down Expand Up @@ -239,14 +239,14 @@ function getRobotMethodsBlocks(currentModule: commonStorage.Module) {
};
}

function getComponentsBlocks(currentModule: commonStorage.Module) {
function getComponentsBlocks(currentModule: commonStorage.Module, hideParams : boolean) {
const contents = [];

// Add the "+ Component" category
contents.push({
kind: 'category',
name: '+ Component',
contents: getAllPossibleComponents(true)
contents: getAllPossibleComponents(hideParams)
});

// Get components from the current workspace
Expand Down