From 3a4adbc2fd1df32e8ce5eec08e3182f519935c40 Mon Sep 17 00:00:00 2001 From: Liubov Galkovska Date: Mon, 10 Feb 2020 11:47:53 +0200 Subject: [PATCH] partial fix for issue #310 --- frontend/app/constants/Selection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/app/constants/Selection.js b/frontend/app/constants/Selection.js index 5d93a5a..914f0d8 100644 --- a/frontend/app/constants/Selection.js +++ b/frontend/app/constants/Selection.js @@ -84,8 +84,8 @@ export function selectionToPolygon(selection) { points.push(points[0]); points.forEach(function(point) { - let lat = fixedPoint(point.lat ? point.lat : point[0]); - let lng = fixedPoint(point.lng ? point.lng : point[1]); + let lat = fixedPoint(selection.type == Types.Polygon ? point[0] : point.lat); + let lng = fixedPoint(selection.type == Types.Polygon ? point[1] : point.lng); coords.push(new Array(lng, lat)); });