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
|
@ -147,11 +147,11 @@ const drawElementOnCanvas = (
|
|||
: element.textAlign === "right"
|
||||
? element.width
|
||||
: 0;
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
for (let index = 0; index < lines.length; index++) {
|
||||
context.fillText(
|
||||
lines[i],
|
||||
lines[index],
|
||||
horizontalOffset,
|
||||
(i + 1) * lineHeight - verticalOffset,
|
||||
(index + 1) * lineHeight - verticalOffset,
|
||||
);
|
||||
}
|
||||
context.fillStyle = fillStyle;
|
||||
|
|
|
@ -620,13 +620,13 @@ const renderSelectionBorder = (
|
|||
context.translate(sceneState.scrollX, sceneState.scrollY);
|
||||
|
||||
const count = selectionColors.length;
|
||||
for (var i = 0; i < count; ++i) {
|
||||
context.strokeStyle = selectionColors[i];
|
||||
for (let index = 0; index < count; ++index) {
|
||||
context.strokeStyle = selectionColors[index];
|
||||
context.setLineDash([
|
||||
dashWidth,
|
||||
spaceWidth + (dashWidth + spaceWidth) * (count - 1),
|
||||
]);
|
||||
context.lineDashOffset = (dashWidth + spaceWidth) * i;
|
||||
context.lineDashOffset = (dashWidth + spaceWidth) * index;
|
||||
strokeRectWithRotation(
|
||||
context,
|
||||
elementX1 - dashedLinePadding,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue