Skip to content

Commit 86154e6

Browse files
committed
Fix default constraints, validation of center for the Circle
1 parent 42888d7 commit 86154e6

3 files changed

Lines changed: 1 addition & 97 deletions

File tree

web/client/components/mapcontrols/annotations/CoordinatesRow.jsx

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -58,38 +58,6 @@ class CoordinatesRowComponent extends React.Component {
5858
min: -180,
5959
max: 180
6060
}
61-
},
62-
aeronautical: {
63-
lat: {
64-
degree: {
65-
min: 0,
66-
max: 60
67-
},
68-
minutes: {
69-
min: 0,
70-
max: 60
71-
},
72-
seconds: {
73-
min: 0,
74-
max: 60,
75-
precision: 3
76-
}
77-
},
78-
lon: {
79-
degree: {
80-
min: 0,
81-
max: 180
82-
},
83-
minutes: {
84-
min: 0,
85-
max: 60
86-
},
87-
seconds: {
88-
min: 0,
89-
max: 60,
90-
precision: 3
91-
}
92-
}
9361
}
9462
}}
9563
/>
@@ -111,38 +79,6 @@ class CoordinatesRowComponent extends React.Component {
11179
min: -180,
11280
max: 180
11381
}
114-
},
115-
aeronautical: {
116-
lat: {
117-
degree: {
118-
min: 0,
119-
max: 60
120-
},
121-
minutes: {
122-
min: 0,
123-
max: 60
124-
},
125-
seconds: {
126-
min: 0,
127-
max: 60,
128-
precision: 3
129-
}
130-
},
131-
lon: {
132-
degree: {
133-
min: 0,
134-
max: 180
135-
},
136-
minutes: {
137-
min: 0,
138-
max: 60
139-
},
140-
seconds: {
141-
min: 0,
142-
max: 60,
143-
precision: 3
144-
}
145-
}
14682
}
14783
}}
14884
/>

web/client/components/mapcontrols/annotations/editors/DecimalCoordinateEditor.jsx

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,6 @@ class DecimalCoordinateEditor extends React.Component {
2929
min: -180,
3030
max: 180
3131
}
32-
},
33-
aeronautical: {
34-
lat: {
35-
degree: {
36-
min: 0,
37-
max: 60
38-
},
39-
minutes: {
40-
min: 0,
41-
max: 60
42-
},
43-
seconds: {
44-
min: 0,
45-
max: 60,
46-
precision: 3
47-
}
48-
},
49-
lon: {
50-
degree: {
51-
min: 0,
52-
max: 180
53-
},
54-
minutes: {
55-
min: 0,
56-
max: 60
57-
},
58-
seconds: {
59-
min: 0,
60-
max: 60,
61-
precision: 3
62-
}
63-
}
6432
}
6533
}
6634
}

web/client/reducers/annotations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function annotations(state = { validationErrors: {} }, action) {
8989
let centerOL;
9090
let c = [[[]]];
9191
// polygonGeom setting
92-
if ([selected.properties.center].filter(validateCoordsArray).length) {
92+
if (validateCoordsArray(selected.properties.center)) {
9393
centerOL = reproject(selected.properties.center, "EPSG:4326", "EPSG:3857");
9494
c = ol.geom.Polygon.fromCircle(new ol.geom.Circle([centerOL.x, centerOL.y], radius), 100).getCoordinates();
9595
} else {

0 commit comments

Comments
 (0)