Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
4163ea20
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,发现更多精彩内容 >>
提交
4163ea20
编写于
8月 12, 2019
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixes #78228
上级
bdd162c5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
11 deletion
+14
-11
src/vs/base/browser/ui/grid/gridview.ts
src/vs/base/browser/ui/grid/gridview.ts
+2
-2
src/vs/base/browser/ui/splitview/splitview.ts
src/vs/base/browser/ui/splitview/splitview.ts
+12
-9
未找到文件。
src/vs/base/browser/ui/grid/gridview.ts
浏览文件 @
4163ea20
...
@@ -549,11 +549,11 @@ class LeafNode implements ISplitView, IDisposable {
...
@@ -549,11 +549,11 @@ class LeafNode implements ISplitView, IDisposable {
}
}
}
}
setVisible
(
visible
:
boolean
):
void
{
setVisible
(
visible
:
boolean
,
cachedVisibleSize
?:
number
):
void
{
if
(
visible
)
{
if
(
visible
)
{
this
.
_cachedVisibleSize
=
undefined
;
this
.
_cachedVisibleSize
=
undefined
;
}
else
{
}
else
{
this
.
_cachedVisibleSize
=
this
.
_size
;
this
.
_cachedVisibleSize
=
t
ypeof
cachedVisibleSize
===
'
number
'
?
cachedVisibleSize
:
t
his
.
_size
;
}
}
if
(
this
.
view
.
setVisible
)
{
if
(
this
.
view
.
setVisible
)
{
...
...
src/vs/base/browser/ui/splitview/splitview.ts
浏览文件 @
4163ea20
...
@@ -49,7 +49,7 @@ export interface IView {
...
@@ -49,7 +49,7 @@ export interface IView {
readonly
priority
?:
LayoutPriority
;
readonly
priority
?:
LayoutPriority
;
readonly
snap
?:
boolean
;
readonly
snap
?:
boolean
;
layout
(
size
:
number
,
orientation
:
Orientation
):
void
;
layout
(
size
:
number
,
orientation
:
Orientation
):
void
;
setVisible
?(
visible
:
boolean
):
void
;
setVisible
?(
visible
:
boolean
,
cachedVisibleSize
?:
number
):
void
;
}
}
interface
ISashEvent
{
interface
ISashEvent
{
...
@@ -79,7 +79,7 @@ abstract class ViewItem {
...
@@ -79,7 +79,7 @@ abstract class ViewItem {
return
typeof
this
.
_cachedVisibleSize
===
'
undefined
'
;
return
typeof
this
.
_cachedVisibleSize
===
'
undefined
'
;
}
}
set
visible
(
visible
:
boolean
)
{
set
Visible
(
visible
:
boolean
,
size
?:
number
):
void
{
if
(
visible
===
this
.
visible
)
{
if
(
visible
===
this
.
visible
)
{
return
;
return
;
}
}
...
@@ -88,14 +88,14 @@ abstract class ViewItem {
...
@@ -88,14 +88,14 @@ abstract class ViewItem {
this
.
size
=
clamp
(
this
.
_cachedVisibleSize
!
,
this
.
viewMinimumSize
,
this
.
viewMaximumSize
);
this
.
size
=
clamp
(
this
.
_cachedVisibleSize
!
,
this
.
viewMinimumSize
,
this
.
viewMaximumSize
);
this
.
_cachedVisibleSize
=
undefined
;
this
.
_cachedVisibleSize
=
undefined
;
}
else
{
}
else
{
this
.
_cachedVisibleSize
=
this
.
size
;
this
.
_cachedVisibleSize
=
t
ypeof
size
===
'
number
'
?
size
:
t
his
.
size
;
this
.
size
=
0
;
this
.
size
=
0
;
}
}
dom
.
toggleClass
(
this
.
container
,
'
visible
'
,
visible
);
dom
.
toggleClass
(
this
.
container
,
'
visible
'
,
visible
);
if
(
this
.
view
.
setVisible
)
{
if
(
this
.
view
.
setVisible
)
{
this
.
view
.
setVisible
(
visible
);
this
.
view
.
setVisible
(
visible
,
this
.
_cachedVisibleSize
);
}
}
}
}
...
@@ -161,6 +161,7 @@ interface ISashItem {
...
@@ -161,6 +161,7 @@ interface ISashItem {
interface
ISashDragSnapState
{
interface
ISashDragSnapState
{
readonly
index
:
number
;
readonly
index
:
number
;
readonly
limitDelta
:
number
;
readonly
limitDelta
:
number
;
readonly
size
:
number
;
}
}
interface
ISashDragState
{
interface
ISashDragState
{
...
@@ -453,7 +454,7 @@ export class SplitView extends Disposable {
...
@@ -453,7 +454,7 @@ export class SplitView extends Disposable {
}
}
const
viewItem
=
this
.
viewItems
[
index
];
const
viewItem
=
this
.
viewItems
[
index
];
viewItem
.
visible
=
visible
;
viewItem
.
setVisible
(
visible
)
;
this
.
distributeEmptySpace
(
index
);
this
.
distributeEmptySpace
(
index
);
this
.
layoutViews
();
this
.
layoutViews
();
...
@@ -552,7 +553,8 @@ export class SplitView extends Disposable {
...
@@ -552,7 +553,8 @@ export class SplitView extends Disposable {
snapBefore
=
{
snapBefore
=
{
index
:
snapBeforeIndex
,
index
:
snapBeforeIndex
,
limitDelta
:
viewItem
.
visible
?
minDelta
-
halfSize
:
minDelta
+
halfSize
limitDelta
:
viewItem
.
visible
?
minDelta
-
halfSize
:
minDelta
+
halfSize
,
size
:
viewItem
.
size
};
};
}
}
...
@@ -562,7 +564,8 @@ export class SplitView extends Disposable {
...
@@ -562,7 +564,8 @@ export class SplitView extends Disposable {
snapAfter
=
{
snapAfter
=
{
index
:
snapAfterIndex
,
index
:
snapAfterIndex
,
limitDelta
:
viewItem
.
visible
?
maxDelta
+
halfSize
:
maxDelta
-
halfSize
limitDelta
:
viewItem
.
visible
?
maxDelta
+
halfSize
:
maxDelta
-
halfSize
,
size
:
viewItem
.
size
};
};
}
}
}
}
...
@@ -740,14 +743,14 @@ export class SplitView extends Disposable {
...
@@ -740,14 +743,14 @@ export class SplitView extends Disposable {
const
snapView
=
this
.
viewItems
[
snapBefore
.
index
];
const
snapView
=
this
.
viewItems
[
snapBefore
.
index
];
const
visible
=
delta
>=
snapBefore
.
limitDelta
;
const
visible
=
delta
>=
snapBefore
.
limitDelta
;
snapped
=
visible
!==
snapView
.
visible
;
snapped
=
visible
!==
snapView
.
visible
;
snapView
.
visible
=
visible
;
snapView
.
setVisible
(
visible
,
snapBefore
.
size
)
;
}
}
if
(
!
snapped
&&
snapAfter
)
{
if
(
!
snapped
&&
snapAfter
)
{
const
snapView
=
this
.
viewItems
[
snapAfter
.
index
];
const
snapView
=
this
.
viewItems
[
snapAfter
.
index
];
const
visible
=
delta
<
snapAfter
.
limitDelta
;
const
visible
=
delta
<
snapAfter
.
limitDelta
;
snapped
=
visible
!==
snapView
.
visible
;
snapped
=
visible
!==
snapView
.
visible
;
snapView
.
visible
=
visible
;
snapView
.
setVisible
(
visible
,
snapAfter
.
size
)
;
}
}
if
(
snapped
)
{
if
(
snapped
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录