提交 578d6140 编写于 作者: S Sandeep Somavarapu

rename back and fix focus issues

上级 f0adafa9
......@@ -95,7 +95,10 @@ export class MarkersPanel extends Panel {
public focus(): void {
if (this.markersModel.hasFilteredResources()) {
this.tree.focusFirst();
this.tree.DOMFocus();
if (!this.tree.getFocus()) {
this.tree.focusFirst();
}
}
}
......@@ -136,10 +139,11 @@ export class MarkersPanel extends Panel {
}
private createTree(parent: HTMLElement):void {
var treeContainer= dom.append(parent, dom.emmet('.tree-container'));
var actionProvider = this.instantiationService.createInstance(ActionProvider);
var renderer = this.instantiationService.createInstance(Viewer.Renderer, this.getActionRunner(), actionProvider);
var controller = this.instantiationService.createInstance(Controller);
this.tree= new TreeImpl.Tree(parent, {
this.tree= new TreeImpl.Tree(treeContainer, {
dataSource: new Viewer.DataSource(),
renderer: renderer,
controller: controller
......
......@@ -25,16 +25,17 @@ export class Controller extends treedefaults.DefaultController {
}
protected onLeftClick(tree: tree.ITree, element: any, event: mouse.IMouseEvent): boolean {
if (this.openFileAtElement(element)) {
return true;
if (super.onLeftClick(tree, element, event)) {
return this.openFileAtElement(element);
}
return super.onLeftClick(tree, element, event);
return false;
}
protected onEnter(tree: tree.ITree, event: keyboard.IKeyboardEvent): boolean {
super.onEnter(tree, event);
this.openFileAtElement(tree.getFocus());
return true;
if (super.onEnter(tree, event)) {
return this.openFileAtElement(tree.getFocus());
}
return false;
}
private openFileAtElement(element: any) {
......
......@@ -33,12 +33,16 @@
display: inline-block;
}
.markers-panel .markers-panel-container .monaco-tree .monaco-tree-row .content .marker-stats {
.markers-panel .markers-panel-container .tree-container {
height: 89%;
}
.markers-panel .markers-panel-container .tree-container .monaco-tree .monaco-tree-row .content .marker-stats {
display: inline-block;
margin-left: 10px;
}
.markers-panel .markers-panel-container .monaco-tree .monaco-tree-row .content .count-badge-wrapper {
.markers-panel .markers-panel-container .tree-container .monaco-tree .monaco-tree-row .content .count-badge-wrapper {
display: inline-block;
margin-left: 10px;
line-height: 22px;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册