Skip to content

Commit

Permalink
Merge pull request #607 from lihqi/lhq-3.8.3alpha
Browse files Browse the repository at this point in the history
fix(lb-components): Display on top view when trackID is 0
  • Loading branch information
lihqi authored Oct 30, 2024
2 parents b3917ed + 6395015 commit f270248
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @createdate 2022-07-11
* @author Ron <[email protected]>
*/
import _ from 'lodash';
import _, { isNumber } from 'lodash';
import { IPointCloudConfig, toolStyleConverter, UpdatePolygonByDragList, INVALID_COLOR } from '@labelbee/lb-utils';
import { EDragTarget, ESortDirection, DEFAULT_TEXT_OFFSET } from '@/constant/annotation';
import { EPolygonPattern } from '@/constant/tool';
Expand Down Expand Up @@ -237,7 +237,7 @@ class PointCloud2dOperation extends PolygonOperation {
isClose: true,
lineType: this.config?.lineType,
});
if (polygon?.trackID) {
if (isNumber(polygon?.trackID) && polygon?.trackID >= 0) {
this.renderdrawTrackID(polygon);
}
// Only the rectangle shows the direction.
Expand Down Expand Up @@ -276,7 +276,7 @@ class PointCloud2dOperation extends PolygonOperation {
// Only the rectangle shows the direction.
if (selectedPolygon.isRect === true && this.showDirectionLine === true) {
this.renderRectPolygonDirection(polygon);
if (selectedPolygon?.trackID) {
if (isNumber(selectedPolygon?.trackID) && selectedPolygon?.trackID >= 0) {
this.renderdrawTrackID(selectedPolygon);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const BoxTrackIDInput = () => {
return;
}

if (newTrackID < 0) {
if (!(newTrackID > 0)) {
message.error(t('PositiveIntegerCheck'));
return;
}
Expand Down

0 comments on commit f270248

Please sign in to comment.