Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
ccf46ea3
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ccf46ea3
编写于
6月 07, 2018
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
💄
sash enabled property
上级
0010eacc
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
34 addition
and
46 deletion
+34
-46
src/vs/base/browser/ui/sash/sash.ts
src/vs/base/browser/ui/sash/sash.ts
+29
-37
src/vs/base/browser/ui/splitview/splitview.ts
src/vs/base/browser/ui/splitview/splitview.ts
+1
-5
src/vs/editor/browser/widget/diffEditorWidget.ts
src/vs/editor/browser/widget/diffEditorWidget.ts
+3
-3
src/vs/editor/contrib/zoneWidget/zoneWidget.ts
src/vs/editor/contrib/zoneWidget/zoneWidget.ts
+1
-1
未找到文件。
src/vs/base/browser/ui/sash/sash.ts
浏览文件 @
ccf46ea3
...
...
@@ -52,16 +52,39 @@ export class Sash {
private
el
:
HTMLElement
;
private
layoutProvider
:
ISashLayoutProvider
;
private
isDisabled
:
boolean
;
private
hidden
:
boolean
;
private
orientation
:
Orientation
;
private
size
:
number
;
private
disposables
:
IDisposable
[]
=
[];
private
_onDidStart
=
new
Emitter
<
ISashEvent
>
();
private
_onDidChange
=
new
Emitter
<
ISashEvent
>
();
private
_onDidReset
=
new
Emitter
<
void
>
();
private
_onDidEnd
=
new
Emitter
<
void
>
();
private
_enabled
=
true
;
get
enabled
():
boolean
{
return
this
.
_enabled
;
}
set
enabled
(
enabled
:
boolean
)
{
this
.
_enabled
=
enabled
;
if
(
enabled
)
{
removeClass
(
this
.
el
,
'
disabled
'
);
}
else
{
addClass
(
this
.
el
,
'
disabled
'
);
}
this
.
_onDidEnablementChange
.
fire
(
enabled
);
}
private
readonly
_onDidEnablementChange
=
new
Emitter
<
boolean
>
();
readonly
onDidEnablementChange
:
Event
<
boolean
>
=
this
.
_onDidEnablementChange
.
event
;
private
readonly
_onDidStart
=
new
Emitter
<
ISashEvent
>
();
readonly
onDidStart
:
Event
<
ISashEvent
>
=
this
.
_onDidStart
.
event
;
private
readonly
_onDidChange
=
new
Emitter
<
ISashEvent
>
();
readonly
onDidChange
:
Event
<
ISashEvent
>
=
this
.
_onDidChange
.
event
;
private
readonly
_onDidReset
=
new
Emitter
<
void
>
();
readonly
onDidReset
:
Event
<
void
>
=
this
.
_onDidReset
.
event
;
private
readonly
_onDidEnd
=
new
Emitter
<
void
>
();
readonly
onDidEnd
:
Event
<
void
>
=
this
.
_onDidEnd
.
event
;
constructor
(
container
:
HTMLElement
,
layoutProvider
:
ISashLayoutProvider
,
options
:
ISashOptions
=
{})
{
this
.
el
=
append
(
container
,
$
(
'
.monaco-sash
'
));
...
...
@@ -85,27 +108,10 @@ export class Sash {
this
.
setOrientation
(
options
.
orientation
||
Orientation
.
VERTICAL
);
this
.
isDisabled
=
false
;
this
.
hidden
=
false
;
this
.
layoutProvider
=
layoutProvider
;
}
get
onDidStart
():
Event
<
ISashEvent
>
{
return
this
.
_onDidStart
.
event
;
}
get
onDidChange
():
Event
<
ISashEvent
>
{
return
this
.
_onDidChange
.
event
;
}
get
onDidReset
():
Event
<
void
>
{
return
this
.
_onDidReset
.
event
;
}
get
onDidEnd
():
Event
<
void
>
{
return
this
.
_onDidEnd
.
event
;
}
setOrientation
(
orientation
:
Orientation
):
void
{
this
.
orientation
=
orientation
;
...
...
@@ -127,7 +133,7 @@ export class Sash {
private
onMouseDown
(
e
:
MouseEvent
):
void
{
EventHelper
.
stop
(
e
,
false
);
if
(
this
.
isDis
abled
)
{
if
(
!
this
.
en
abled
)
{
return
;
}
...
...
@@ -279,20 +285,6 @@ export class Sash {
return
this
.
hidden
;
}
enable
():
void
{
removeClass
(
this
.
el
,
'
disabled
'
);
this
.
isDisabled
=
false
;
}
disable
():
void
{
addClass
(
this
.
el
,
'
disabled
'
);
this
.
isDisabled
=
true
;
}
get
enabled
():
boolean
{
return
!
this
.
isDisabled
;
}
dispose
():
void
{
if
(
this
.
el
&&
this
.
el
.
parentElement
)
{
this
.
el
.
parentElement
.
removeChild
(
this
.
el
);
...
...
src/vs/base/browser/ui/splitview/splitview.ts
浏览文件 @
ccf46ea3
...
...
@@ -461,11 +461,7 @@ export class SplitView implements IDisposable {
const
expandsUp
=
reverseViews
.
map
(
i
=>
previous
=
(
i
.
view
.
maximumSize
-
i
.
size
>
0
)
||
previous
).
reverse
();
this
.
sashItems
.
forEach
((
s
,
i
)
=>
{
if
((
collapsesDown
[
i
]
&&
expandsUp
[
i
+
1
])
||
(
expandsDown
[
i
]
&&
collapsesUp
[
i
+
1
]))
{
s
.
sash
.
enable
();
}
else
{
s
.
sash
.
disable
();
}
s
.
sash
.
enabled
=
(
collapsesDown
[
i
]
&&
expandsUp
[
i
+
1
])
||
(
expandsDown
[
i
]
&&
collapsesUp
[
i
+
1
]);
});
}
...
...
src/vs/editor/browser/widget/diffEditorWidget.ts
浏览文件 @
ccf46ea3
...
...
@@ -1520,7 +1520,7 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd
this
.
_sash
=
this
.
_register
(
new
Sash
(
this
.
_dataSource
.
getContainerDomNode
(),
this
));
if
(
this
.
_disableSash
)
{
this
.
_sash
.
disable
()
;
this
.
_sash
.
enabled
=
false
;
}
this
.
_sash
.
onDidStart
(()
=>
this
.
onSashDragStart
());
...
...
@@ -1539,9 +1539,9 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd
this
.
_disableSash
=
newDisableSash
;
if
(
this
.
_disableSash
)
{
this
.
_sash
.
disable
()
;
this
.
_sash
.
enabled
=
false
;
}
else
{
this
.
_sash
.
enable
()
;
this
.
_sash
.
enable
d
=
true
;
}
}
}
...
...
src/vs/editor/contrib/zoneWidget/zoneWidget.ts
浏览文件 @
ccf46ea3
...
...
@@ -459,7 +459,7 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider {
if
(
!
this
.
options
.
isResizeable
)
{
this
.
_resizeSash
.
hide
();
this
.
_resizeSash
.
disable
()
;
this
.
_resizeSash
.
enabled
=
false
;
}
let
data
:
{
startY
:
number
;
heightInLines
:
number
;
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录