소스 검색

FancyTree: fix focus item

LeoVgr 2 주 전
부모
커밋
cea9dc347c
2개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      hide/comp/FancyTree.hx
  2. 0 1
      hide/comp/cdb/Editor.hx

+ 1 - 1
hide/comp/FancyTree.hx

@@ -663,7 +663,7 @@ class FancyTree<TreeItem> extends hide.comp.Component {
 			var currentIndex = flatData.indexOf(currentItem);
 
 			if (currentIndex >= 0) {
-				var currentHeight = currentIndex * itemHeightPx - offsetTop;
+				var currentHeight = currentIndex * itemHeightPx + offsetTop;
 				if (currentHeight < scroll.scrollTop) {
 					scroll.scrollTo(scroll.scrollLeft, currentHeight);
 				}

+ 0 - 1
hide/comp/cdb/Editor.hx

@@ -372,7 +372,6 @@ class Editor extends Component {
 
 		searchBox.find("#results").text(results > 0 ? '$results Results' : 'No results');
 
-		// if (updateCursor)
 		cursor.update();
 	}