mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Update ESLint rules (#2342)
This commit is contained in:
parent
56938cf874
commit
e05acd6fd9
15 changed files with 107 additions and 101 deletions
|
@ -105,9 +105,9 @@ const duplicateElements = (
|
|||
|
||||
const finalElements: ExcalidrawElement[] = [];
|
||||
|
||||
let i = 0;
|
||||
while (i < elements.length) {
|
||||
const element = elements[i];
|
||||
let index = 0;
|
||||
while (index < elements.length) {
|
||||
const element = elements[index];
|
||||
if (appState.selectedElementIds[element.id]) {
|
||||
if (element.groupIds.length) {
|
||||
const groupId = getSelectedGroupForElement(appState, element);
|
||||
|
@ -120,7 +120,7 @@ const duplicateElements = (
|
|||
duplicateAndOffsetElement(element),
|
||||
),
|
||||
);
|
||||
i = i + groupElements.length;
|
||||
index = index + groupElements.length;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ const duplicateElements = (
|
|||
} else {
|
||||
finalElements.push(element);
|
||||
}
|
||||
i++;
|
||||
index++;
|
||||
}
|
||||
|
||||
fixBindingsAfterDuplication(finalElements, oldElements, oldIdToDuplicatedId);
|
||||
|
|
|
@ -92,8 +92,8 @@ export const actionFinalize = register({
|
|||
const linePoints = multiPointElement.points;
|
||||
const firstPoint = linePoints[0];
|
||||
mutateElement(multiPointElement, {
|
||||
points: linePoints.map((point, i) =>
|
||||
i === linePoints.length - 1
|
||||
points: linePoints.map((point, index) =>
|
||||
index === linePoints.length - 1
|
||||
? ([firstPoint[0], firstPoint[1]] as const)
|
||||
: point,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue