Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
07e43687
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,发现更多精彩内容 >>
提交
07e43687
编写于
11月 28, 2018
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
data tree: use proper loading
上级
f8e9f80d
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
112 addition
and
14 deletion
+112
-14
src/vs/base/browser/ui/tree/abstractTree.ts
src/vs/base/browser/ui/tree/abstractTree.ts
+4
-8
src/vs/base/browser/ui/tree/dataTree.ts
src/vs/base/browser/ui/tree/dataTree.ts
+2
-5
src/vs/base/browser/ui/tree/media/loading-dark.svg
src/vs/base/browser/ui/tree/media/loading-dark.svg
+31
-0
src/vs/base/browser/ui/tree/media/loading-hc.svg
src/vs/base/browser/ui/tree/media/loading-hc.svg
+31
-0
src/vs/base/browser/ui/tree/media/loading.svg
src/vs/base/browser/ui/tree/media/loading.svg
+31
-0
src/vs/base/browser/ui/tree/media/tree.css
src/vs/base/browser/ui/tree/media/tree.css
+12
-0
src/vs/base/browser/ui/tree/tree.ts
src/vs/base/browser/ui/tree/tree.ts
+1
-1
未找到文件。
src/vs/base/browser/ui/tree/abstractTree.ts
浏览文件 @
07e43687
...
@@ -151,16 +151,12 @@ class TreeRenderer<T, TFilterData, TTemplateData> implements IListRenderer<ITree
...
@@ -151,16 +151,12 @@ class TreeRenderer<T, TFilterData, TTemplateData> implements IListRenderer<ITree
}
}
private
renderTwistie
(
node
:
ITreeNode
<
T
,
TFilterData
>
,
twistieElement
:
HTMLElement
)
{
private
renderTwistie
(
node
:
ITreeNode
<
T
,
TFilterData
>
,
twistieElement
:
HTMLElement
)
{
if
(
this
.
renderer
.
renderTwistie
&&
this
.
renderer
.
renderTwistie
(
node
.
element
,
twistieElement
)
)
{
if
(
this
.
renderer
.
renderTwistie
)
{
return
;
this
.
renderer
.
renderTwistie
(
node
.
element
,
twistieElement
)
;
}
}
TreeRenderer
.
renderDefaultTwistie
(
node
,
twistieElement
);
toggleClass
(
twistieElement
,
'
collapsible
'
,
node
.
collapsible
);
}
toggleClass
(
twistieElement
,
'
collapsed
'
,
node
.
collapsed
);
private
static
renderDefaultTwistie
<
T
>
(
node
:
ITreeNode
<
T
,
any
>
,
twistie
:
HTMLElement
):
void
{
toggleClass
(
twistie
,
'
collapsible
'
,
node
.
collapsible
);
toggleClass
(
twistie
,
'
collapsed
'
,
node
.
collapsed
);
}
}
dispose
():
void
{
dispose
():
void
{
...
...
src/vs/base/browser/ui/tree/dataTree.ts
浏览文件 @
07e43687
...
@@ -12,6 +12,7 @@ import { Emitter, Event, mapEvent } from 'vs/base/common/event';
...
@@ -12,6 +12,7 @@ import { Emitter, Event, mapEvent } from 'vs/base/common/event';
import
{
timeout
,
always
}
from
'
vs/base/common/async
'
;
import
{
timeout
,
always
}
from
'
vs/base/common/async
'
;
import
{
ISequence
}
from
'
vs/base/common/iterator
'
;
import
{
ISequence
}
from
'
vs/base/common/iterator
'
;
import
{
IListStyles
}
from
'
vs/base/browser/ui/list/listWidget
'
;
import
{
IListStyles
}
from
'
vs/base/browser/ui/list/listWidget
'
;
import
{
toggleClass
}
from
'
vs/base/browser/dom
'
;
export
interface
IDataSource
<
T
extends
NonNullable
<
any
>>
{
export
interface
IDataSource
<
T
extends
NonNullable
<
any
>>
{
hasChildren
(
element
:
T
|
null
):
boolean
;
hasChildren
(
element
:
T
|
null
):
boolean
;
...
@@ -72,11 +73,7 @@ class DataTreeRenderer<T, TFilterData, TTemplateData> implements ITreeRenderer<I
...
@@ -72,11 +73,7 @@ class DataTreeRenderer<T, TFilterData, TTemplateData> implements ITreeRenderer<I
}
}
renderTwistie
(
element
:
IDataTreeNode
<
T
>
,
twistieElement
:
HTMLElement
):
boolean
{
renderTwistie
(
element
:
IDataTreeNode
<
T
>
,
twistieElement
:
HTMLElement
):
boolean
{
if
(
element
.
state
===
DataTreeNodeState
.
Slow
)
{
toggleClass
(
twistieElement
,
'
loading
'
,
element
.
state
===
DataTreeNodeState
.
Slow
);
twistieElement
.
innerText
=
'
🤨
'
;
return
true
;
}
return
false
;
return
false
;
}
}
...
...
src/vs/base/browser/ui/tree/media/loading-dark.svg
0 → 100644
浏览文件 @
07e43687
<?xml version='1.0' standalone='no' ?>
<svg
xmlns=
'http://www.w3.org/2000/svg'
version=
'1.1'
width=
'10px'
height=
'10px'
>
<style>
circle {
animation: ball 0.6s linear infinite;
}
circle:nth-child(2) { animation-delay: 0.075s; }
circle:nth-child(3) { animation-delay: 0.15s; }
circle:nth-child(4) { animation-delay: 0.225s; }
circle:nth-child(5) { animation-delay: 0.3s; }
circle:nth-child(6) { animation-delay: 0.375s; }
circle:nth-child(7) { animation-delay: 0.45s; }
circle:nth-child(8) { animation-delay: 0.525s; }
@keyframes ball {
from { opacity: 1; }
to { opacity: 0.3; }
}
</style>
<g
style=
"fill:grey;"
>
<circle
cx=
'5'
cy=
'1'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'7.8284'
cy=
'2.1716'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'9'
cy=
'5'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'7.8284'
cy=
'7.8284'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'5'
cy=
'9'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'2.1716'
cy=
'7.8284'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'1'
cy=
'5'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'2.1716'
cy=
'2.1716'
r=
'1'
style=
'opacity:0.3;'
/>
</g>
</svg>
src/vs/base/browser/ui/tree/media/loading-hc.svg
0 → 100644
浏览文件 @
07e43687
<?xml version='1.0' standalone='no' ?>
<svg
xmlns=
'http://www.w3.org/2000/svg'
version=
'1.1'
width=
'10px'
height=
'10px'
>
<style>
circle {
animation: ball 0.6s linear infinite;
}
circle:nth-child(2) { animation-delay: 0.075s; }
circle:nth-child(3) { animation-delay: 0.15s; }
circle:nth-child(4) { animation-delay: 0.225s; }
circle:nth-child(5) { animation-delay: 0.3s; }
circle:nth-child(6) { animation-delay: 0.375s; }
circle:nth-child(7) { animation-delay: 0.45s; }
circle:nth-child(8) { animation-delay: 0.525s; }
@keyframes ball {
from { opacity: 1; }
to { opacity: 0.3; }
}
</style>
<g
style=
"fill:white;"
>
<circle
cx=
'5'
cy=
'1'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'7.8284'
cy=
'2.1716'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'9'
cy=
'5'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'7.8284'
cy=
'7.8284'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'5'
cy=
'9'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'2.1716'
cy=
'7.8284'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'1'
cy=
'5'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'2.1716'
cy=
'2.1716'
r=
'1'
style=
'opacity:0.3;'
/>
</g>
</svg>
src/vs/base/browser/ui/tree/media/loading.svg
0 → 100644
浏览文件 @
07e43687
<?xml version='1.0' standalone='no' ?>
<svg
xmlns=
'http://www.w3.org/2000/svg'
version=
'1.1'
width=
'10px'
height=
'10px'
>
<style>
circle {
animation: ball 0.6s linear infinite;
}
circle:nth-child(2) { animation-delay: 0.075s; }
circle:nth-child(3) { animation-delay: 0.15s; }
circle:nth-child(4) { animation-delay: 0.225s; }
circle:nth-child(5) { animation-delay: 0.3s; }
circle:nth-child(6) { animation-delay: 0.375s; }
circle:nth-child(7) { animation-delay: 0.45s; }
circle:nth-child(8) { animation-delay: 0.525s; }
@keyframes ball {
from { opacity: 1; }
to { opacity: 0.3; }
}
</style>
<g>
<circle
cx=
'5'
cy=
'1'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'7.8284'
cy=
'2.1716'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'9'
cy=
'5'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'7.8284'
cy=
'7.8284'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'5'
cy=
'9'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'2.1716'
cy=
'7.8284'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'1'
cy=
'5'
r=
'1'
style=
'opacity:0.3;'
/>
<circle
cx=
'2.1716'
cy=
'2.1716'
r=
'1'
style=
'opacity:0.3;'
/>
</g>
</svg>
src/vs/base/browser/ui/tree/media/tree.css
浏览文件 @
07e43687
...
@@ -51,4 +51,16 @@
...
@@ -51,4 +51,16 @@
.hc-black
.monaco-tl-twistie.collapsible.collapsed
{
.hc-black
.monaco-tl-twistie.collapsible.collapsed
{
background-image
:
url("collapsed-hc.svg")
;
background-image
:
url("collapsed-hc.svg")
;
}
.monaco-tl-twistie.loading
{
background-image
:
url("loading.svg")
;
}
.vs-dark
.monaco-tl-twistie.loading
{
background-image
:
url("loading-dark.svg")
;
}
.hc-black
.monaco-tl-twistie.loading
{
background-image
:
url("loading-hc.svg")
;
}
}
\ No newline at end of file
src/vs/base/browser/ui/tree/tree.ts
浏览文件 @
07e43687
...
@@ -107,7 +107,7 @@ export interface ITreeModel<T, TFilterData, TRef> {
...
@@ -107,7 +107,7 @@ export interface ITreeModel<T, TFilterData, TRef> {
}
}
export
interface
ITreeRenderer
<
T
,
TFilterData
,
TTemplateData
>
extends
IListRenderer
<
ITreeNode
<
T
,
TFilterData
>
,
TTemplateData
>
{
export
interface
ITreeRenderer
<
T
,
TFilterData
,
TTemplateData
>
extends
IListRenderer
<
ITreeNode
<
T
,
TFilterData
>
,
TTemplateData
>
{
renderTwistie
?(
element
:
T
,
twistieElement
:
HTMLElement
):
boolean
;
renderTwistie
?(
element
:
T
,
twistieElement
:
HTMLElement
):
void
;
onDidChangeTwistieState
?:
Event
<
T
>
;
onDidChangeTwistieState
?:
Event
<
T
>
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录