diff --git a/src/field/FieldList.tsx b/src/field/FieldList.tsx index 8b03843..6b074f8 100644 --- a/src/field/FieldList.tsx +++ b/src/field/FieldList.tsx @@ -136,7 +136,7 @@ const columns: Column[] = [ render: row => { return ( - + ) } diff --git a/src/field/Fieldminimap.tsx b/src/field/Fieldminimap.tsx index 0752610..d657ae5 100644 --- a/src/field/Fieldminimap.tsx +++ b/src/field/Fieldminimap.tsx @@ -9,10 +9,12 @@ import { GeometryMapping } from "models/GeometryMapping"; interface Props { field: Field + squared?: boolean + borderSpacing?: number } export default function FieldMinimap(props: Props) { - const { field } = props + const { field, squared, borderSpacing } = props const MAPBOX_TOKEN = import.meta.env.VITE_MAPBOX_ACCESS_TOKEN; const [geoCollection, setGeoCollection] = useState(); @@ -42,7 +44,7 @@ export default function FieldMinimap(props: Props) { latDiff){ + //if the longitude is the narrow bound apply half of the diff between the diffs to the min and max lats + let halfDiff = (longDiff - latDiff)/2 + minLat = minLat - halfDiff + maxLat = maxLat + halfDiff + } else { + //if the longitude is not the narrow bound apply half of the diff between the diffs to the min and max longs + let halfDiff = (latDiff - longDiff)/2 + minLong = minLong - halfDiff + maxLong = maxLong + halfDiff + } } if(spacing){ minLong = minLong - spacing @@ -194,7 +206,6 @@ export class Field { new LngLat(minLong, minLat), new LngLat(maxLong, maxLat) ); - // return[southWest, northEast] } public grainName(): string {