Skip to content

Commit

Permalink
geosolutions-it#9606 Error with circle annotations + radius selection (
Browse files Browse the repository at this point in the history
  • Loading branch information
diegovargasg authored and allyoucanmap committed Nov 22, 2023
1 parent e654fba commit abddbfb
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 abddbfb

Please sign in to comment.