Skip to content

Commit

Permalink
fix: text appears when unmeasured
Browse files Browse the repository at this point in the history
  • Loading branch information
zouyaoji committed Dec 11, 2022
1 parent f4e6647 commit d570f0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/composables/use-drawing/use-drawing-polyline.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author: zouyaoji@https://github.com/zouyaoji
* @Date: 2021-10-21 10:43:32
* @LastEditTime: 2022-07-14 18:04:54
* @LastEditTime: 2022-12-12 00:48:15
* @LastEditors: zouyaoji
* @Description:
* @FilePath: \vue-cesium@next\packages\composables\use-drawing\use-drawing-polyline.ts
Expand Down Expand Up @@ -203,7 +203,7 @@ export default function (props, ctx, cmpName: string) {

const polylineLabelOpts = Object.assign({}, props.labelOpts, polyline.labelOpts)

if (props.showLabel) {
if (props.showLabel && positions.length) {
if (cmpName.includes('Area')) {
labels.push({
text: MeasureUnits.areaToString(area, props.measureUnits?.areaUnits, props.locale, props.decimals?.area),
Expand Down

0 comments on commit d570f0c

Please sign in to comment.