Skip to content

Commit

Permalink
#9606 Error with circle annotations + radius selection (#9607) (#9727)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Vargas <[email protected]>
  • Loading branch information
allyoucanmap and diegovargasg authored Nov 22, 2023
1 parent 2ae9b16 commit c9ab236
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class CoordinatesEditor extends React.Component {
if (this.isValid(this.props.components, radius )) {
this.props.onChangeRadius(parseFloat(radius), this.props.components.map(coordToArray), uom);
} else if (radius !== "") {
this.props.onChangeRadius(parseFloat(radius), [], uom);
this.props.onChangeRadius(parseFloat(radius), [[0, 0]], uom);
} else {
this.props.onChangeRadius(null, this.props.components.map(coordToArray), uom);
this.props.onSetInvalidSelected("radius", this.props.components.map(coordToArray));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ describe("test the CoordinatesEditor Panel", () => {
inputRadius.value = 10000;
TestUtils.Simulate.change(inputRadius);
expect(spyOnChangeRadius).toHaveBeenCalled();
expect(spyOnChangeRadius).toHaveBeenCalledWith(10000, [], mapProjection);
expect(spyOnChangeRadius).toHaveBeenCalledWith(10000, [[0, 0]], mapProjection);
expect(spyOnSetInvalidSelected).toNotHaveBeenCalled();
});

Expand Down

0 comments on commit c9ab236

Please sign in to comment.