Skip to content
Snippets Groups Projects

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

1 file
+ 5
1
Compare changes
  • Side-by-side
  • Inline
@@ -47,6 +47,10 @@ export default function getPolygonCoords({
const { p1, p2, p3 } = getCurveCoords({ x, y, point, height, width, pointToProjection });
const p0 = lastPoint;
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 });
});
}
Loading