-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #607 from lihqi/lhq-3.8.3alpha
fix(lb-components): Display on top view when trackID is 0
- Loading branch information
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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'; | ||
|
@@ -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. | ||
|
@@ -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); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters