mirror of
https://github.com/excalidraw/excalidraw
synced 2025-07-25 13:58:22 +08:00
Compare commits
4 Commits
dwelle/vis
...
zsviczian-
Author | SHA1 | Date | |
---|---|---|---|
e5db4ce2dc | |||
cd61f5964c | |||
ad14721cb5 | |||
d45dc931ee |
@ -141,6 +141,10 @@ export const SearchMenu = () => {
|
|||||||
height: match.matchedLines[0]?.height,
|
height: match.matchedLines[0]?.height,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const isTinyText =
|
||||||
|
app.state.zoom.value *
|
||||||
|
searchMatches.items[focusIndex].textElement.fontSize <
|
||||||
|
16;
|
||||||
if (
|
if (
|
||||||
!isElementCompletelyInViewport(
|
!isElementCompletelyInViewport(
|
||||||
[matchAsElement],
|
[matchAsElement],
|
||||||
@ -155,7 +159,8 @@ export const SearchMenu = () => {
|
|||||||
},
|
},
|
||||||
app.scene.getNonDeletedElementsMap(),
|
app.scene.getNonDeletedElementsMap(),
|
||||||
app.getEditorUIOffsets(),
|
app.getEditorUIOffsets(),
|
||||||
)
|
) ||
|
||||||
|
isTinyText
|
||||||
) {
|
) {
|
||||||
app.scrollToContent(matchAsElement, {
|
app.scrollToContent(matchAsElement, {
|
||||||
fitToContent: true,
|
fitToContent: true,
|
||||||
|
Reference in New Issue
Block a user