Skip to content

Commit

Permalink
feat: Change defaultSize param names
Browse files Browse the repository at this point in the history
feat: Change defaultSize param names

feat: Change defaultSize param names
  • Loading branch information
[email protected] committed Aug 10, 2023
1 parent d259ae8 commit 99c3864
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const LimitPopover = ({
const sizeRange = limit?.sizeLimit?.sizeRange;
const positionLimit = limit?.positionLimit;

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

return (
Expand All @@ -30,7 +30,7 @@ const LimitPopover = ({
<div>
{t('DefaultSize')}
</div>
<span>{`${t('Length')}: ${lengthDefault}m、`}</span>
<span>{`${t('Length')}: ${depthDefault}m、`}</span>
<span>{`${t('Width')}: ${widthDefault}m、`}</span>
<span>{`${t('Height')}: ${heightDefault}m`}</span>
</div>
Expand All @@ -39,7 +39,7 @@ const LimitPopover = ({
{sizeRange && (
<div style={{ marginBottom: '24px' }}>
<div>*{t('NormalSizeRange')}</div>
<span>{`${t('Length')}:: ${lengthMin}~${lengthMax}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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ export const usePointCloudViews = () => {
const newBoxParams: IPointCloudBox = {
...selectedBox.info,
width: Number(defaultSize.widthDefault),
depth: Number(defaultSize.lengthDefault),
depth: Number(defaultSize.depthDefault),
height: Number(defaultSize.heightDefault),
}
const newPointCloudBoxList = updateSelectedBoxes([newBoxParams]);
Expand Down
6 changes: 3 additions & 3 deletions packages/lb-utils/src/types/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
export interface ISizeRange {
heightMax?: string;
heightMin?: string;
lengthMax?: string;
lengthMin?: string;
depthMax?: string;
depthMin?: string;
widthMax?: string;
widthMin?: string;
}

// Default size
export interface IDefaultSize {
heightDefault: string;
lengthDefault: string;
depthDefault: string;
widthDefault: string;
}

Expand Down

0 comments on commit 99c3864

Please sign in to comment.