Skip to content

Commit

Permalink
refactor: flip name logic
Browse files Browse the repository at this point in the history
  • Loading branch information
RODO94 committed Oct 17, 2024
1 parent d3b0b1a commit 4f4bccd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/components/my-map/drawing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function configureDrawingLayerStyle(
drawType: DrawTypeEnum,
drawColor: string,
drawMany: boolean,
showLabels: boolean,
hideDrawLabels: boolean,
feature: FeatureLike,
) {
drawColor = feature.get("color") || drawColor;
Expand All @@ -97,7 +97,7 @@ function configureDrawingLayerStyle(
fill: new Fill({ color: drawColor }),
}),
text:
drawMany && showLabels
drawMany && !hideDrawLabels
? styleFeatureLabels(drawType, feature)
: undefined,
});
Expand All @@ -112,7 +112,7 @@ function configureDrawingLayerStyle(
width: 3,
}),
text:
drawMany && showLabels
drawMany && !hideDrawLabels
? styleFeatureLabels(drawType, feature)
: undefined,
}),
Expand Down
4 changes: 2 additions & 2 deletions src/components/my-map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export class MyMap extends LitElement {
areaUnit: AreaUnitEnum = "m2";

@property({ type: Boolean })
showLabels = false;
hideDrawLabels = false;

@property({ type: Boolean })
showScale = false;
Expand Down Expand Up @@ -529,7 +529,7 @@ export class MyMap extends LitElement {
this.drawType,
this.drawColor,
this.drawMany,
this.showLabels,
this.hideDrawLabels,
);
if (this.drawMode) {
// Clear drawingSource to begin, even if drawGeojsonData is provided
Expand Down

0 comments on commit 4f4bccd

Please sign in to comment.