Skip to content

Commit

Permalink
Remove parenthesis from when only showing x or y coordinates on point
Browse files Browse the repository at this point in the history
  • Loading branch information
amaliejvik committed Aug 5, 2024
1 parent 3af72bb commit a2d3f3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Components/Point.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ class Point extends Component implements Collider, DragListener<Point> {

public getDisplayText(): string {
if (this.legendCoordinates === "x") {
return "(" + this.position.x.toFixed(1) + ")";
return this.position.x.toFixed(1);
} else if (this.legendCoordinates === "y") {
return "(" + this.position.y.toFixed(1) + ")";
return this.position.y.toFixed(1);
} else {
return (
"(" +
Expand Down

0 comments on commit a2d3f3f

Please sign in to comment.