Skip to content

Commit

Permalink
#154 Lint対応
Browse files Browse the repository at this point in the history
  • Loading branch information
ienaga committed Nov 28, 2024
1 parent 75c84fb commit 8419d2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/text/src/TextField/usecase/TextFieldArrowLeftUseCase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,23 @@ export const execute = (text_field: TextField, shift_key: boolean): void =>
if (!textObject || textObject.line > line) {
break;
}

if (textObject.line !== line) {
continue;
}

textWidth += textObject.w;
}

const width = text_field.width;
const scaleX = (text_field.textWidth - width) / width;

const scrollWidth = text_field.scrollX * scaleX - 2;
if (textWidth > width && currentTextObject && line < currentLine) {
if (text_field.yScrollShape.hasLocalVariable("job")) {
text_field.yScrollShape.deleteLocalVariable("job");
}

text_field.scrollX = text_field.width;
return ;
}
Expand All @@ -102,7 +102,7 @@ export const execute = (text_field: TextField, shift_key: boolean): void =>
if (text_field.yScrollShape.hasLocalVariable("job")) {
text_field.yScrollShape.deleteLocalVariable("job");
}

text_field.scrollX = text_field.width * ((textWidth - 2) / text_field.textWidth);
return ;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ export const execute = (text_field: TextField, shift_key: boolean): void =>
text_field.scrollX += textObject.w / scaleX;
break;
}

}
};

0 comments on commit 8419d2b

Please sign in to comment.