Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
5129f3bc
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,发现更多精彩内容 >>
提交
5129f3bc
编写于
6月 12, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
keep active tab visible when resizing
上级
b86b2cbb
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
4 deletion
+22
-4
src/vs/workbench/browser/parts/editor/sideBySideEditorControl.ts
...workbench/browser/parts/editor/sideBySideEditorControl.ts
+6
-1
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
+11
-3
src/vs/workbench/browser/parts/editor/titleControl.ts
src/vs/workbench/browser/parts/editor/titleControl.ts
+5
-0
未找到文件。
src/vs/workbench/browser/parts/editor/sideBySideEditorControl.ts
浏览文件 @
5129f3bc
...
...
@@ -1278,10 +1278,15 @@ export class SideBySideEditorControl implements ISideBySideEditorControl, IVerti
}
});
// Layout
activ
e editors
// Layout
visibl
e editors
POSITIONS
.
forEach
(
position
=>
{
this
.
layoutEditor
(
position
);
});
// Layout title controls
POSITIONS
.
forEach
(
position
=>
{
this
.
titleAreaControl
[
position
].
layout
();
});
}
private
layoutEditor
(
position
:
Position
):
void
{
...
...
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
浏览文件 @
5129f3bc
...
...
@@ -30,6 +30,7 @@ import {TitleControl} from 'vs/workbench/browser/parts/editor/titleControl';
export
class
TabsTitleControl
extends
TitleControl
{
private
titleContainer
:
Builder
;
private
tabsContainer
:
Builder
;
private
activeTab
:
Builder
;
private
groupActionsToolbar
:
ToolBar
;
private
tabActionBars
:
ActionBar
[];
...
...
@@ -140,8 +141,6 @@ export class TabsTitleControl extends TitleControl {
this
.
tabActionBars
.
pop
().
dispose
();
}
let
activeTab
:
HTMLElement
;
// Add a tab for each opened editor
this
.
context
.
getEditors
().
forEach
(
editor
=>
{
const
isPinned
=
group
.
isPinned
(
editor
);
...
...
@@ -163,7 +162,7 @@ export class TabsTitleControl extends TitleControl {
// Active state
if
(
isActive
)
{
tab
.
addClass
(
'
active
'
);
activeTab
=
tab
.
getHTMLElement
(
);
this
.
activeTab
=
$
(
tab
);
}
else
{
tab
.
removeClass
(
'
active
'
);
}
...
...
@@ -194,7 +193,16 @@ export class TabsTitleControl extends TitleControl {
});
});
this
.
layout
();
}
public
layout
():
void
{
if
(
!
this
.
activeTab
)
{
return
;
}
// Always reveal the active one
const
activeTab
=
this
.
activeTab
.
getHTMLElement
();
const
container
=
this
.
tabsContainer
.
getHTMLElement
();
const
containerWidth
=
container
.
offsetWidth
;
const
containerScrollPosX
=
container
.
scrollLeft
;
...
...
src/vs/workbench/browser/parts/editor/titleControl.ts
浏览文件 @
5129f3bc
...
...
@@ -43,6 +43,7 @@ export interface ITitleAreaControl {
allowDragging
(
element
:
HTMLElement
):
boolean
;
create
(
parent
:
Builder
):
void
;
refresh
():
void
;
layout
():
void
;
dispose
():
void
;
}
...
...
@@ -95,6 +96,10 @@ export abstract class TitleControl {
public
abstract
refresh
();
public
layout
():
void
{
// Subclasses can opt in to react on layout
}
public
allowDragging
(
element
:
HTMLElement
):
boolean
{
return
!
DOM
.
findParentWithClass
(
element
,
'
monaco-action-bar
'
,
'
one-editor-container
'
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录