Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
95045cb7
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,发现更多精彩内容 >>
提交
95045cb7
编写于
2月 21, 2019
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixes #65585
上级
e2faba61
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
23 deletion
+16
-23
src/vs/base/browser/ui/splitview/panelview.ts
src/vs/base/browser/ui/splitview/panelview.ts
+16
-12
src/vs/workbench/contrib/files/browser/views/openEditorsView.ts
.../workbench/contrib/files/browser/views/openEditorsView.ts
+0
-11
未找到文件。
src/vs/base/browser/ui/splitview/panelview.ts
浏览文件 @
95045cb7
...
...
@@ -42,9 +42,10 @@ export abstract class Panel implements IView {
private
static
readonly
HEADER_SIZE
=
22
;
readonly
element
:
HTMLElement
;
private
header
:
HTMLElement
;
private
body
:
HTMLElement
;
protected
_expanded
:
boolean
;
protected
disposables
:
IDisposable
[]
=
[];
private
expandedSize
:
number
|
undefined
=
undefined
;
private
_headerVisible
=
true
;
...
...
@@ -52,12 +53,13 @@ export abstract class Panel implements IView {
private
_maximumBodySize
:
number
;
private
ariaHeaderLabel
:
string
;
private
styles
:
IPanelStyles
=
{};
private
header
:
HTMLElement
;
private
animationTimer
:
number
|
null
=
null
;
private
_onDidChange
=
new
Emitter
<
number
|
undefined
>
();
readonly
onDidChange
:
Event
<
number
|
undefined
>
=
this
.
_onDidChange
.
event
;
protected
disposables
:
IDisposable
[]
=
[];
get
draggableElement
():
HTMLElement
{
return
this
.
header
;
}
...
...
@@ -133,6 +135,15 @@ export abstract class Panel implements IView {
this
.
updateHeader
();
this
.
_onDidChange
.
fire
(
expanded
?
this
.
expandedSize
:
undefined
);
if
(
expanded
)
{
clearTimeout
(
this
.
animationTimer
);
append
(
this
.
element
,
this
.
body
);
}
else
{
this
.
animationTimer
=
window
.
setTimeout
(()
=>
{
this
.
body
.
remove
();
},
200
);
}
return
true
;
}
...
...
@@ -179,15 +190,8 @@ export abstract class Panel implements IView {
domEvent
(
this
.
header
,
'
click
'
)
(()
=>
this
.
setExpanded
(
!
this
.
isExpanded
()),
null
,
this
.
disposables
);
// TODO@Joao move this down to panelview
// onHeaderKeyDown.filter(e => e.keyCode === KeyCode.UpArrow)
// .event(focusPrevious, this, this.disposables);
// onHeaderKeyDown.filter(e => e.keyCode === KeyCode.DownArrow)
// .event(focusNext, this, this.disposables);
const
body
=
append
(
this
.
element
,
$
(
'
.panel-body
'
));
this
.
renderBody
(
body
);
this
.
body
=
append
(
this
.
element
,
$
(
'
.panel-body
'
));
this
.
renderBody
(
this
.
body
);
}
layout
(
height
:
number
):
void
{
...
...
src/vs/workbench/contrib/files/browser/views/openEditorsView.ts
浏览文件 @
95045cb7
...
...
@@ -280,7 +280,6 @@ export class OpenEditorsView extends ViewletPanel {
this
.
listRefreshScheduler
.
schedule
(
0
);
this
.
disposables
.
push
(
this
.
onDidChangeBodyVisibility
(
visible
=>
{
this
.
updateListVisibility
(
visible
);
if
(
visible
&&
this
.
needsRefresh
)
{
this
.
listRefreshScheduler
.
schedule
(
0
);
}
...
...
@@ -310,16 +309,6 @@ export class OpenEditorsView extends ViewletPanel {
}
}
private
updateListVisibility
(
isVisible
:
boolean
):
void
{
if
(
this
.
list
)
{
if
(
isVisible
)
{
dom
.
show
(
this
.
list
.
getHTMLElement
());
}
else
{
dom
.
hide
(
this
.
list
.
getHTMLElement
());
// make sure the list goes out of the tabindex world by hiding it
}
}
}
private
get
showGroups
():
boolean
{
return
this
.
editorGroupService
.
groups
.
length
>
1
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录