Skip to content
Snippets Groups Projects
Commit c0f01ae5 authored by Miłosz Grocholewski's avatar Miłosz Grocholewski
Browse files

Merge branch 'bugfix/MIN-126-wrong-shape-of-the-drug-element' into 'development'

fix(vector-map): correct numPoints for bezier curve

Closes MIN-126

See merge request !364
parents 627e4cc5 723b99e0
No related branches found
No related tags found
1 merge request!364fix(vector-map): correct numPoints for bezier curve
Pipeline #100264 passed
...@@ -47,6 +47,10 @@ export default function getPolygonCoords({ ...@@ -47,6 +47,10 @@ export default function getPolygonCoords({
const { p1, p2, p3 } = getCurveCoords({ x, y, point, height, width, pointToProjection }); const { p1, p2, p3 } = getCurveCoords({ x, y, point, height, width, pointToProjection });
const p0 = lastPoint; const p0 = lastPoint;
lastPoint = p3; lastPoint = p3;
return getBezierCurve({ p0, p1, p2, p3, numPoints: 3 }); let numPoints = 3;
if (p0[0] === p3[0] || p0[1] === p3[1]) {
numPoints = 9;
}
return getBezierCurve({ p0, p1, p2, p3, numPoints });
}); });
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment