Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
68bac685
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,发现更多精彩内容 >>
提交
68bac685
编写于
4月 25, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
grid - some feedback wip
上级
239c0452
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
38 addition
and
12 deletion
+38
-12
src/vs/workbench/browser/parts/editor2/nextEditorGroupView.ts
...vs/workbench/browser/parts/editor2/nextEditorGroupView.ts
+23
-10
src/vs/workbench/browser/parts/editor2/nextEditorPart.ts
src/vs/workbench/browser/parts/editor2/nextEditorPart.ts
+13
-2
src/vs/workbench/services/editor/common/nextEditorPartService.ts
...workbench/services/editor/common/nextEditorPartService.ts
+2
-0
未找到文件。
src/vs/workbench/browser/parts/editor2/nextEditorGroupView.ts
浏览文件 @
68bac685
...
...
@@ -35,6 +35,8 @@ export class NextEditorGroupView extends Themable implements IView {
private
group
:
EditorGroup
;
private
dimension
:
Dimension
;
private
_element
:
HTMLElement
;
private
container
:
HTMLElement
;
...
...
@@ -52,6 +54,14 @@ export class NextEditorGroupView extends Themable implements IView {
this
.
group
.
label
=
`Group <
${
this
.
group
.
id
}
>`
;
}
get
id
():
GroupIdentifier
{
return
this
.
group
.
id
;
}
get
element
():
HTMLElement
{
return
this
.
_element
;
}
openEditor
(
input
:
EditorInput
,
options
?:
EditorOptions
):
INextEditor
{
// Update model
...
...
@@ -66,13 +76,7 @@ export class NextEditorGroupView extends Themable implements IView {
return
Object
.
create
(
null
);
// TODO@grid implement
}
get
element
():
HTMLElement
{
return
this
.
_element
;
}
get
id
():
GroupIdentifier
{
return
this
.
group
.
id
;
}
//#region Themable Implementation
protected
updateStyles
():
void
{
super
.
updateStyles
();
...
...
@@ -92,6 +96,10 @@ export class NextEditorGroupView extends Themable implements IView {
// TODO@grid Editor container border
}
//#endregion
//#region IView implementation
render
(
container
:
HTMLElement
):
void
{
// TODO@grid simplify containers by flattening the hierarchy more?
...
...
@@ -138,9 +146,14 @@ export class NextEditorGroupView extends Themable implements IView {
this
.
updateStyles
();
}
layout
(
size
:
number
,
orientation
:
Orientation
):
void
{
layout
(
size
:
number
):
void
{
this
.
dimension
=
new
Dimension
(
size
,
-
1
);
// TODO@grid need full dimension here
// Layout title
// this.titleAreaControl.layout(new Dimension(size, NextEditorGroupView.EDITOR_TITLE_HEIGHT));
// Layout title if present
if
(
this
.
titleAreaControl
)
{
this
.
titleAreaControl
.
layout
(
new
Dimension
(
this
.
dimension
.
width
,
NextEditorGroupView
.
EDITOR_TITLE_HEIGHT
));
}
}
//#endregion
}
\ No newline at end of file
src/vs/workbench/browser/parts/editor2/nextEditorPart.ts
浏览文件 @
68bac685
...
...
@@ -45,7 +45,7 @@ export class NextEditorPart extends Part implements INextEditorPartService {
this
.
_onLayout
=
this
.
_register
(
new
Emitter
<
Dimension
>
());
this
.
createGrid
();
this
.
doCreateGridView
();
}
//#region Service Implementation
...
...
@@ -62,6 +62,17 @@ export class NextEditorPart extends Part implements INextEditorPartService {
return
this
.
_groups
.
get
(
identifier
);
}
// addGroup(index?: number): INextEditorGroup {
// const activeLocation = this.groupToLocation.get(this._activeGroup.id);
// const parentLocation = activeLocation.slice(0, activeLocation.length - 1);
// if (typeof index !== 'number') {
// index = activeLocation[activeLocation.length - 1] + 1;
// }
// return this.doCreateGroup([...parentLocation, index]);
// }
//#endregion
//#region Grid Controller
...
...
@@ -97,7 +108,7 @@ export class NextEditorPart extends Part implements INextEditorPartService {
return
this
.
_onLayout
.
event
;
}
private
createGrid
():
void
{
private
doCreateGridView
():
void
{
// Container
this
.
gridContainer
=
document
.
createElement
(
'
div
'
);
...
...
src/vs/workbench/services/editor/common/nextEditorPartService.ts
浏览文件 @
68bac685
...
...
@@ -40,5 +40,7 @@ export interface INextEditorPartService {
readonly
activeGroup
:
INextEditorGroup
;
readonly
groups
:
INextEditorGroup
[];
// addGroup(group: GroupIdentifier, direction: SplitDirection): INextEditorGroup;
getGroup
(
identifier
:
GroupIdentifier
):
INextEditorGroup
;
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录