Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
078cce2b
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
078cce2b
编写于
2月 05, 2019
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix ctor issue
上级
defcf949
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
20 addition
and
26 deletion
+20
-26
src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts
src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts
+1
-1
src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts
src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts
+19
-25
未找到文件。
src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts
浏览文件 @
078cce2b
...
...
@@ -381,7 +381,7 @@ export class BreadcrumbsControl {
}
else
{
pickerArrowOffset
=
(
data
.
left
+
(
data
.
width
*
0.3
))
-
x
;
}
picker
.
s
etInput
(
element
,
maxHeight
,
pickerWidth
,
pickerArrowSize
,
Math
.
max
(
0
,
pickerArrowOffset
));
picker
.
s
how
(
element
,
maxHeight
,
pickerWidth
,
pickerArrowSize
,
Math
.
max
(
0
,
pickerArrowOffset
));
return
{
x
,
y
};
},
onHide
:
(
data
)
=>
{
...
...
src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts
浏览文件 @
078cce2b
...
...
@@ -52,12 +52,12 @@ export abstract class BreadcrumbsPicker {
protected
readonly
_disposables
=
new
Array
<
IDisposable
>
();
protected
readonly
_domNode
:
HTMLDivElement
;
protected
readonly
_arrow
:
HTMLDivElement
;
protected
readonly
_treeContainer
:
HTMLDivElement
;
protected
readonly
_tree
:
Tree
<
any
,
any
>
;
protected
readonly
_fakeEvent
=
new
UIEvent
(
'
fakeEvent
'
);
protected
readonly
_focus
:
dom
.
IFocusTracker
;
pr
ivate
_layoutInfo
:
ILayoutInfo
;
protected
_arrow
:
HTMLDivElement
;
protected
_treeContainer
:
HTMLDivElement
;
protected
_tree
:
Tree
<
any
,
any
>
;
protected
_fakeEvent
=
new
UIEvent
(
'
fakeEvent
'
);
protected
_focus
:
dom
.
IFocusTracker
;
pr
otected
_layoutInfo
:
ILayoutInfo
;
private
readonly
_onDidPickElement
=
new
Emitter
<
{
target
:
any
,
payload
:
any
}
>
();
readonly
onDidPickElement
:
Event
<
{
target
:
any
,
payload
:
any
}
>
=
this
.
_onDidPickElement
.
event
;
...
...
@@ -78,6 +78,16 @@ export abstract class BreadcrumbsPicker {
this
.
_focus
=
dom
.
trackFocus
(
this
.
_domNode
);
this
.
_focus
.
onDidBlur
(
_
=>
this
.
_onDidPickElement
.
fire
({
target
:
undefined
,
payload
:
undefined
}),
undefined
,
this
.
_disposables
);
this
.
_disposables
.
push
(
onDidChangeZoomLevel
(
_
=>
this
.
_onDidPickElement
.
fire
({
target
:
undefined
,
payload
:
undefined
})));
}
dispose
():
void
{
dispose
(
this
.
_disposables
);
this
.
_onDidPickElement
.
dispose
();
this
.
_tree
.
dispose
();
this
.
_focus
.
dispose
();
}
show
(
input
:
any
,
maxHeight
:
number
,
width
:
number
,
arrowSize
:
number
,
arrowOffset
:
number
):
void
{
const
theme
=
this
.
_themeService
.
getTheme
();
const
color
=
theme
.
getColor
(
breadcrumbsPickerBackground
);
...
...
@@ -126,21 +136,10 @@ export abstract class BreadcrumbsPicker {
dom
.
toggleClass
(
this
.
_treeContainer
,
'
align-icons-and-twisties
'
,
fileIconTheme
.
hasFileIcons
&&
!
fileIconTheme
.
hasFolderIcons
);
dom
.
toggleClass
(
this
.
_treeContainer
,
'
hide-arrows
'
,
fileIconTheme
.
hidesExplorerArrows
===
true
);
};
this
.
_disposables
.
push
(
_themeService
.
onDidFileIconThemeChange
(
onFileIconThemeChange
));
onFileIconThemeChange
(
_themeService
.
getFileIconTheme
());
this
.
_disposables
.
push
(
this
.
_themeService
.
onDidFileIconThemeChange
(
onFileIconThemeChange
));
onFileIconThemeChange
(
this
.
_themeService
.
getFileIconTheme
());
this
.
_domNode
.
focus
();
}
dispose
():
void
{
dispose
(
this
.
_disposables
);
this
.
_onDidPickElement
.
dispose
();
this
.
_tree
.
dispose
();
this
.
_focus
.
dispose
();
}
setInput
(
input
:
any
,
maxHeight
:
number
,
width
:
number
,
arrowSize
:
number
,
arrowOffset
:
number
):
void
{
this
.
_layoutInfo
=
{
maxHeight
,
width
,
arrowSize
,
arrowOffset
,
inputHeight
:
0
};
this
.
_setInput
(
input
).
then
(()
=>
{
...
...
@@ -167,7 +166,6 @@ export abstract class BreadcrumbsPicker {
}
protected
abstract
_setInput
(
element
:
BreadcrumbElement
):
Promise
<
void
>
;
protected
abstract
_createTree
(
container
:
HTMLElement
):
Tree
<
any
,
any
>
;
protected
abstract
_getTargetFromEvent
(
element
:
any
,
payload
:
UIEvent
):
any
|
undefined
;
}
...
...
@@ -492,11 +490,7 @@ export class BreadcrumbsOutlinePicker extends BreadcrumbsPicker {
return
Promise
.
resolve
();
}
protected
_getTargetFromEvent
(
element
:
any
,
payload
:
any
):
any
|
undefined
{
// todo@joh
if
(
payload
&&
payload
.
didClickOnTwistie
)
{
return
;
}
protected
_getTargetFromEvent
(
element
:
any
):
any
|
undefined
{
if
(
element
instanceof
OutlineElement
)
{
return
element
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录