Skip to content

Commit

Permalink
Remove empty tab groups
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Oct 15, 2023
1 parent 8b9a198 commit 1296982
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion photon-client/src/components/dashboard/ConfigOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const tabGroups = computed<ConfigOption[][]>(() => {
const isAprilTag = useCameraSettingsStore().currentWebsocketPipelineType === WebsocketPipelineType.AprilTag;
const isAruco = useCameraSettingsStore().currentWebsocketPipelineType === WebsocketPipelineType.Aruco;
return getTabGroups().map((tabGroup) =>
var ret = getTabGroups().map((tabGroup) =>
tabGroup.filter(
(tabConfig) =>
!(!allow3d && tabConfig.tabName === "3D") && //Filter out 3D tab any time 3D isn't calibrated
Expand All @@ -115,6 +115,9 @@ const tabGroups = computed<ConfigOption[][]>(() => {
!(!isAruco && tabConfig.tabName === "Aruco") //Filter out aruco unless we actually are doing Aruco
)
);
// remove empty tab groups
ret = ret.filter((it) => it.length);
return ret;
});
onBeforeUpdate(() => {
Expand Down

0 comments on commit 1296982

Please sign in to comment.