Skip to content

Commit

Permalink
fix(lb-components): Function of additional secondary attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
lihqi committed May 20, 2024
1 parent ce3263e commit b5a69a8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@ const useAudioSegment = (props: IProps) => {
props;

const { audioClipState, setAudioClipState } = useAudioClipStore();
const { selectedRegion, clipConfigurable, segment, clipTextList, subAttributeList } =
audioClipState;
const {
selectedRegion,
clipConfigurable,
segment,
clipTextList,
subAttributeList,
secondaryAttributeConfigurable = false,
} = audioClipState;
const { id } = selectedRegion;
const segmentTimeTip = useRef<null | number>(null);
const mouseEvent = useRef<null | MouseEvent>(null);
Expand Down Expand Up @@ -75,7 +81,9 @@ const useAudioSegment = (props: IProps) => {
...clearText,
id: waveRef.current?.util.getId('segment_'),
start: time,
subAttribute: TagUtils.getDefaultResultByConfig(subAttributeList ?? []),
subAttribute: TagUtils.getDefaultResultByConfig(
secondaryAttributeConfigurable ? subAttributeList ?? [] : [],
),
};

updateRegion?.(targetLeft);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,9 @@ export const usePointCloudViews = () => {
const newPointCloudList = addPointCloudBox(boxParams);
const polygonList = ptCtx?.polygonList ?? [];

boxParams.subAttribute = TagUtils.getDefaultResultByConfig(config?.inputList ?? []);
boxParams.subAttribute = TagUtils.getDefaultResultByConfig(
config?.secondaryAttributeConfigurable ? config?.inputList ?? [] : [],
);

topViewInstance?.updatePolygonList(newPointCloudList ?? [], polygonList);
/** If new box is hidden will not active target point box */
Expand Down

0 comments on commit b5a69a8

Please sign in to comment.