mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
chore: Minor refactoring for consistency (#2425)
This commit is contained in:
parent
204c8370a0
commit
b21fd49412
21 changed files with 76 additions and 82 deletions
|
@ -91,8 +91,8 @@ export const dragNewElement = (
|
|||
mutateElement(draggingElement, {
|
||||
x: newX,
|
||||
y: newY,
|
||||
width: width,
|
||||
height: height,
|
||||
width,
|
||||
height,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -44,10 +44,10 @@ export const mutateElement = <TElement extends Mutable<ExcalidrawElement>>(
|
|||
const nextPoints = value;
|
||||
if (prevPoints.length === nextPoints.length) {
|
||||
let didChangePoints = false;
|
||||
let i = prevPoints.length;
|
||||
while (--i) {
|
||||
const prevPoint: Point = prevPoints[i];
|
||||
const nextPoint: Point = nextPoints[i];
|
||||
let index = prevPoints.length;
|
||||
while (--index) {
|
||||
const prevPoint: Point = prevPoints[index];
|
||||
const nextPoint: Point = nextPoints[index];
|
||||
if (
|
||||
prevPoint[0] !== nextPoint[0] ||
|
||||
prevPoint[1] !== nextPoint[1]
|
||||
|
|
|
@ -74,7 +74,7 @@ export const textWysiwyg = ({
|
|||
angle,
|
||||
appState,
|
||||
),
|
||||
textAlign: textAlign,
|
||||
textAlign,
|
||||
color: updatedElement.strokeColor,
|
||||
opacity: updatedElement.opacity / 100,
|
||||
filter: "var(--appearance-filter)",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue