Skip to content

Commit

Permalink
feat(pointcloud-view): Optimized style of empty page
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerwin-L committed Aug 31, 2022
1 parent 24a0784 commit 2bc0a1f
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 9 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { connect } from 'react-redux';
import { aMapStateToProps, IAnnotationStateProps } from '@/store/annotation/map';
import { synchronizeSideView, synchronizeTopView } from './hooks/usePointCloudViews';
import useSize from '@/hooks/useSize';
import EmptyPage from './components/EmptyPage';

/**
* 统一一下,将其拓展为 二维转换为 三维坐标的转换
Expand Down Expand Up @@ -185,11 +186,7 @@ const PointCloudSideView = ({ currentData }: IAnnotationStateProps) => {
>
<div className={getClassName('point-cloud-container', 'bottom-view-content')}>
<div className={getClassName('point-cloud-container', 'core-instance')} ref={ref} />
{!selectedBox && (
<div style={{ ...size }} className={getClassName('point-cloud-container', 'empty-page')}>
暂无数据
</div>
)}
{!selectedBox && <EmptyPage />}
</div>
</PointCloudContainer>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { connect } from 'react-redux';
import { aMapStateToProps, IAnnotationStateProps } from '@/store/annotation/map';
import { usePointCloudViews } from './hooks/usePointCloudViews';
import { useSingleBox } from './hooks/useSingleBox';
import EmptyPage from './components/EmptyPage';

import useSize from '@/hooks/useSize';

/**
Expand Down Expand Up @@ -150,9 +152,7 @@ const PointCloudSideView: React.FC<IAnnotationStateProps> = ({ currentData }) =>
>
<div className={getClassName('point-cloud-container', 'bottom-view-content')}>
<div className={getClassName('point-cloud-container', 'core-instance')} ref={ref} />
{!selectedBox && (
<div className={getClassName('point-cloud-container', 'empty-page')}>暂无数据</div>
)}
{!selectedBox && <EmptyPage />}
</div>
</PointCloudContainer>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @file EmptyPage
* @createDate 2022-08-31
* @author Ron <[email protected]>
*/
import React from 'react';
import NoDataSvg from '@/assets/annotation/pointCloudTool/nodata.svg';
import { getClassName } from '@/utils/dom';

const EmptyPage = () => {
return (
<div className={getClassName('point-cloud-container', 'empty-page')}>
<img src={NoDataSvg} />
<span className={getClassName('point-cloud-container', 'empty-page', 'text')}>暂无数据</span>
</div>
);
};

export default EmptyPage;
4 changes: 4 additions & 0 deletions packages/lb-components/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1589,10 +1589,14 @@ $headerHeight: 40px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
font-size: 16px;
z-index: 20;
height: calc(100% - $headerHeight);
width: 100%;
.#{$ptPrefix}-container__empty-page__text {
margin-top: 13px;
}
}

.#{$ptPrefix}-container__side-view {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ const rotateRoundCenter: IShortcut = {
const Drag3D = {
name: '点云平移',
icon: dragIcon,
shortCut: ['Shift', leftClick],
shortCut: [rightClick],
noticeInfo: '拖动',
};

const DragTopView = {
Expand Down

0 comments on commit 2bc0a1f

Please sign in to comment.