Skip to content

Commit

Permalink
fix: Add extra style in audio text tool
Browse files Browse the repository at this point in the history
  • Loading branch information
752342314@qq.com committed Nov 28, 2023
1 parent bcbef5a commit 0324cf2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import React from 'react';
import { useAudioClipStore } from '@/components/audioAnnotate/audioContext';
import { useHover, useMouse } from 'ahooks';
import styles from '../index.module.scss';

interface IProps {
/** 展示的容器 */
Expand All @@ -26,6 +27,7 @@ const CombineTip = (props: IProps) => {

return (
<div
className={styles.tips}
style={{
left: mouse.clientX + 20,
top: mouse.clientY - 20,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@
position: relative;
padding-bottom: 10px;
transform: scaleY(-1);
&.clip {
//cursor: url('../../assets/annotation/audio/blackClip.svg'), default;
}
&.combined {
//cursor: url('../../assets/annotation/audio/combine.svg') 10 12, default;
}
}
&::-webkit-scrollbar {
width: 8px;
Expand Down
4 changes: 2 additions & 2 deletions packages/lb-components/src/components/audioPlayer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -806,8 +806,8 @@ export const AudioPlayer = ({
}}
className={classnames({
[styles.waveform]: true,
[styles.combined]: audioClipStateRef.current.combined,
[styles.clip]: audioClipStateRef.current.clipConfigurable,
'bee-audio-combined': audioClipStateRef.current.combined,
'bee-audio-clip': audioClipStateRef.current.clipConfigurable,
})}
>
{invalid && <InvalidPage isAudio={true} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import React, { useRef } from 'react';
import { timeFormat } from '@/utils/audio';
import { useMouse } from 'ahooks';
import styles from '../index.module.scss';

interface IProps {
/** 分割点时间提示 */
Expand All @@ -23,12 +24,15 @@ const SegmentTip = (props: IProps) => {
return null;
}


return (
<div
className={styles.tips}
style={{
left: mouse.clientX,
top: 75,
marginLeft: -130,
zIndex: 999,
}}
>
请选择希望截取的时间点({timeFormat(segmentTimeTip, 'ss.SSS')}
Expand Down
7 changes: 7 additions & 0 deletions packages/lb-components/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2271,3 +2271,10 @@ $predictTrackingPrefix: #{$prefix}-point-cloud-predict-tracking;
right: 0;
z-index: -200;
}

.bee-audio-clip{
cursor: url('./assets/annotation/audio/blackClip.svg'), default;
}
.bee-audio-combined{
cursor: url('./assets/annotation/audio/combine.svg') 10 12, default;
}

0 comments on commit 0324cf2

Please sign in to comment.