Skip to content

Commit

Permalink
Fixes for multi input limits
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanBirtch-aot committed Jun 28, 2024
1 parent 93fa6c2 commit 97f9c28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
19 changes: 2 additions & 17 deletions components/src/components/Map/editForm/Component.edit.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,18 @@ export default
label: "Point Marker",
value: "marker"
},
{
label: "Circle Marker",
value: "circlemarker",
},
{
label: "Polygon",
value: "polygon",
},
{
label: "Polyline",
value: "polyline",
},
{
label: "Rectangle",
value: "rectangle",
},
{
label: "Circle",
value: "circle",
}
],
defaultValue:"marker",
key: "markerType",
type: "simpleradios",
input: true,
},
{
label: "How many Points per Submission? (Only for Point Markers)",
label: "How many Points per Submission?",
key: "numPoints",
type: "simplenumber",
defaultValue: 1,
Expand Down
5 changes: 1 addition & 4 deletions components/src/components/Map/services/MapService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ class MapService {
map.on('draw:created', (e: any) => {
console.log('Drawing created:', e);
let layer = e.layer;
if (
drawnItems.getLayers().length === options.numPoints &&
e?.type === 'marker'
) {
if (drawnItems.getLayers().length === options.numPoints) {
L.popup()
.setLatLng(layer._latlng)
.setContent('<p>Only one marker for submission</p>')
Expand Down

0 comments on commit 97f9c28

Please sign in to comment.