Skip to content

Commit

Permalink
fix: Point cloud configuration display
Browse files Browse the repository at this point in the history
  • Loading branch information
lixinghua123 committed Aug 14, 2023
1 parent 651e187 commit ddfbc66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const LimitPopover = ({
const sizeRange = limit?.sizeLimit?.sizeRange;
const positionLimit = limit?.positionLimit;

const { heightDefault, depthDefault, widthDefault } = defaultSize;
const { heightMax, heightMin, depthMax, depthMin, widthMax, widthMin } = sizeRange;
const { XMin, XMax, YMin, YMax, ZMin, ZMax } = positionLimit;
const { heightDefault, depthDefault, widthDefault } = defaultSize || {};
const { heightMax, heightMin, depthMax, depthMin, widthMax, widthMin } = sizeRange || {};
const { XMin, XMax, YMin, YMax, ZMin, ZMax } = positionLimit || {};

return (
<Tooltip
Expand All @@ -27,9 +27,7 @@ const LimitPopover = ({
<div style={{ padding: '8px' }}>
{defaultSize && (
<div style={{ marginBottom: '24px' }}>
<div>
{t('DefaultSize')}
</div>
<div>{t('DefaultSize')}</div>
<span>{`${t('Length')}: ${depthDefault}m、`}</span>
<span>{`${t('Width')}: ${widthDefault}m、`}</span>
<span>{`${t('Height')}: ${heightDefault}m`}</span>
Expand All @@ -39,7 +37,7 @@ const LimitPopover = ({
{sizeRange && (
<div style={{ marginBottom: '24px' }}>
<div>*{t('NormalSizeRange')}</div>
<span>{`${t('Length')}:: ${depthMin}~${depthMax}m、`}</span>
<span>{`${t('Length')}: ${depthMin}~${depthMax}m、`}</span>
<span>{`${t('Width')}: ${widthMin}~${widthMax}m、`}</span>
<span>{`${t('Height')}: ${heightMin}~${heightMax}m`}</span>
</div>
Expand All @@ -60,9 +58,9 @@ const LimitPopover = ({
src={defaultSizeSvg}
style={{ margin: '0px 8px' }}
onClick={(e) => {
e.preventDefault()
e.preventDefault();
if (defaultSize) {
updateSize?.(defaultSize)
updateSize?.(defaultSize);
}
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/lb-utils/src/types/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ interface IPositionLimit {
export interface ILimit {
sizeLimit: {
sizeRange: ISizeRange;
defaultSize: IDefaultSize;
defaultSize?: IDefaultSize;
logicalCondition: ILogicalCondition[];
};
positionLimit: IPositionLimit;
Expand Down

0 comments on commit ddfbc66

Please sign in to comment.