Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | export default function getHandlesFromPoints(points) { Iif (points.longAxis && points.shortAxis) { const handles = {}; handles.start = points.longAxis[0]; handles.end = points.longAxis[1]; handles.perpendicularStart = points.longAxis[0]; handles.perpendicularEnd = points.longAxis[1]; return handles; } return points .map((p, i) => (i % 10 === 0 ? { start: p } : { end: p })) .reduce((obj, item) => Object.assign(obj, { ...item }), {}); } |