fix some linting/prettier issues

This commit is contained in:
Preet 2023-10-23 10:50:52 -07:00
parent 89218ba596
commit 3700cf2d10
5 changed files with 39 additions and 15 deletions

View file

@ -1078,7 +1078,9 @@ export class LinearElementEditor {
}
});
LinearElementEditor._updatePoints(element, nextPoints, offsetX, offsetY, { segmentSplitIndices: splits });
LinearElementEditor._updatePoints(element, nextPoints, offsetX, offsetY, {
segmentSplitIndices: splits,
});
}
static addPoints(
@ -1217,7 +1219,9 @@ export class LinearElementEditor {
midpoint,
...element.points.slice(segmentMidpoint.index!),
];
const splits = (element.segmentSplitIndices || []).map((index) => (index >= segmentMidpoint.index!) ? (index + 1) : index);
const splits = (element.segmentSplitIndices || []).map((index) =>
index >= segmentMidpoint.index! ? index + 1 : index,
);
mutateElement(element, {
points,
@ -1241,7 +1245,11 @@ export class LinearElementEditor {
nextPoints: readonly Point[],
offsetX: number,
offsetY: number,
otherUpdates?: { startBinding?: PointBinding; endBinding?: PointBinding, segmentSplitIndices?: number[] },
otherUpdates?: {
startBinding?: PointBinding;
endBinding?: PointBinding;
segmentSplitIndices?: number[];
},
) {
const nextCoords = getElementPointsCoords(element, nextPoints);
const prevCoords = getElementPointsCoords(element, element.points);