feat(mindMap): support find

This commit is contained in:
SiriusXT
2025-05-29 23:09:52 +08:00
parent af5eab4518
commit 11b8c3425c
4 changed files with 15 additions and 4 deletions

View File

@@ -85,7 +85,7 @@ export default class FindInHtml {
if (this.$results?.length) {
const $current = this.$results.eq(this.currentIndex);
this.$results.removeClass(FIND_RESULT_SELECTED_CSS_CLASSNAME);
$current[0].scrollIntoView();
$current[0].scrollIntoView({ block: 'center', inline: 'center'});
$current.addClass(FIND_RESULT_SELECTED_CSS_CLASSNAME);
}
}