Skip to content

Commit

Permalink
Merge pull request #3112 from LiteFarmOrg/LF-3828-cant-select-a-fence…
Browse files Browse the repository at this point in the history
…-if-its-a-vertical-line

LF-3828 fix selecting vertical line on map
  • Loading branch information
Duncan-Brain authored Feb 15, 2024
2 parents 5e63b31 + d372694 commit da446d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/webapp/src/containers/Map/useMapAssetRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ const useMapAssetRenderer = ({ isClickable, showingConfirmButtons, drawingState

// Draw a line
const drawLine = (map, maps, mapBounds, line, isVisible) => {
const { line_points: points, name, type, width } = line;
const { line_points: points, type, width } = line;
let linePolygon;
const realWidth =
type === locationEnum.watercourse ? Number(line.buffer_width) + Number(width) : Number(width);
Expand Down
2 changes: 1 addition & 1 deletion packages/webapp/src/containers/Map/useSelectionHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const useSelectionHandler = () => {
locationAssets[locationType].forEach((line) => {
if (
line.polyline.visible &&
maps.geometry.poly.isLocationOnEdge(latLng, line.polyline, 10e-7)
maps.geometry.poly.isLocationOnEdge(latLng, line.polyline, 10e-4)
) {
overlappedLocationsCopy.line.push({
id: line.location_id,
Expand Down

0 comments on commit da446d9

Please sign in to comment.