Compare commits

...

4 Commits

Author SHA1 Message Date
e5db4ce2dc Update SearchMenu.tsx 2024-09-10 18:53:57 +02:00
cd61f5964c Update SearchMenu.tsx 2024-09-10 18:42:35 +02:00
ad14721cb5 Update SearchMenu.tsx 2024-09-10 18:36:13 +02:00
d45dc931ee Zoom to tiny text 2024-09-10 18:29:34 +02:00

View File

@ -141,6 +141,10 @@ export const SearchMenu = () => {
height: match.matchedLines[0]?.height,
});
const isTinyText =
app.state.zoom.value *
searchMatches.items[focusIndex].textElement.fontSize <
16;
if (
!isElementCompletelyInViewport(
[matchAsElement],
@ -155,7 +159,8 @@ export const SearchMenu = () => {
},
app.scene.getNonDeletedElementsMap(),
app.getEditorUIOffsets(),
)
) ||
isTinyText
) {
app.scrollToContent(matchAsElement, {
fitToContent: true,