Compare commits

...

4 Commits

Author SHA1 Message Date
zsviczian
e5db4ce2dc
Update SearchMenu.tsx 2024-09-10 18:53:57 +02:00
zsviczian
cd61f5964c
Update SearchMenu.tsx 2024-09-10 18:42:35 +02:00
zsviczian
ad14721cb5
Update SearchMenu.tsx 2024-09-10 18:36:13 +02:00
zsviczian
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,