Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
0625bc30
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
0625bc30
编写于
8月 07, 2020
作者:
R
rebornix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix #104196. detached overflow widget.
上级
65804aee
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
19 addition
and
2 deletion
+19
-2
src/vs/workbench/contrib/notebook/browser/notebookBrowser.ts
src/vs/workbench/contrib/notebook/browser/notebookBrowser.ts
+1
-0
src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts
...orkbench/contrib/notebook/browser/notebookEditorWidget.ts
+10
-0
src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.ts
...h/contrib/notebook/browser/view/renderers/cellRenderer.ts
+2
-1
src/vs/workbench/contrib/notebook/browser/view/renderers/markdownCell.ts
...h/contrib/notebook/browser/view/renderers/markdownCell.ts
+2
-1
src/vs/workbench/contrib/notebook/test/testNotebookEditor.ts
src/vs/workbench/contrib/notebook/test/testNotebookEditor.ts
+4
-0
未找到文件。
src/vs/workbench/contrib/notebook/browser/notebookBrowser.ts
浏览文件 @
0625bc30
...
@@ -193,6 +193,7 @@ export interface INotebookEditor extends IEditor {
...
@@ -193,6 +193,7 @@ export interface INotebookEditor extends IEditor {
getId
():
string
;
getId
():
string
;
getDomNode
():
HTMLElement
;
getDomNode
():
HTMLElement
;
getOverflowContainerDomNode
():
HTMLElement
;
getInnerWebview
():
Webview
|
undefined
;
getInnerWebview
():
Webview
|
undefined
;
/**
/**
...
...
src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts
浏览文件 @
0625bc30
...
@@ -76,6 +76,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
...
@@ -76,6 +76,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
private
static
readonly
EDITOR_MEMENTOS
=
new
Map
<
string
,
EditorMemento
<
unknown
>>
();
private
static
readonly
EDITOR_MEMENTOS
=
new
Map
<
string
,
EditorMemento
<
unknown
>>
();
private
_overlayContainer
!
:
HTMLElement
;
private
_overlayContainer
!
:
HTMLElement
;
private
_body
!
:
HTMLElement
;
private
_body
!
:
HTMLElement
;
private
_overflowContainer
!
:
HTMLElement
;
private
_webview
:
BackLayerWebView
|
null
=
null
;
private
_webview
:
BackLayerWebView
|
null
=
null
;
private
_webviewResolved
:
boolean
=
false
;
private
_webviewResolved
:
boolean
=
false
;
private
_webviewResolvePromise
:
Promise
<
BackLayerWebView
|
null
>
|
null
=
null
;
private
_webviewResolvePromise
:
Promise
<
BackLayerWebView
|
null
>
|
null
=
null
;
...
@@ -356,6 +357,11 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
...
@@ -356,6 +357,11 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
DOM
.
addClass
(
this
.
_body
,
'
cell-list-container
'
);
DOM
.
addClass
(
this
.
_body
,
'
cell-list-container
'
);
this
.
_createCellList
();
this
.
_createCellList
();
DOM
.
append
(
parent
,
this
.
_body
);
DOM
.
append
(
parent
,
this
.
_body
);
this
.
_overflowContainer
=
document
.
createElement
(
'
div
'
);
DOM
.
addClass
(
this
.
_overflowContainer
,
'
notebook-overflow-widget-container
'
);
DOM
.
addClass
(
this
.
_overflowContainer
,
'
monaco-editor
'
);
DOM
.
append
(
parent
,
this
.
_overflowContainer
);
}
}
private
_createCellList
():
void
{
private
_createCellList
():
void
{
...
@@ -484,6 +490,10 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
...
@@ -484,6 +490,10 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
return
this
.
_overlayContainer
;
return
this
.
_overlayContainer
;
}
}
getOverflowContainerDomNode
()
{
return
this
.
_overflowContainer
;
}
onWillHide
()
{
onWillHide
()
{
this
.
_isVisible
=
false
;
this
.
_isVisible
=
false
;
this
.
_editorFocus
?.
set
(
false
);
this
.
_editorFocus
?.
set
(
false
);
...
...
src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.ts
浏览文件 @
0625bc30
...
@@ -992,7 +992,8 @@ export class CodeCellRenderer extends AbstractCellRenderer implements IListRende
...
@@ -992,7 +992,8 @@ export class CodeCellRenderer extends AbstractCellRenderer implements IListRende
dimension
:
{
dimension
:
{
width
:
0
,
width
:
0
,
height
:
0
height
:
0
}
},
overflowWidgetsDomNode
:
this
.
notebookEditor
.
getOverflowContainerDomNode
()
},
{});
},
{});
disposables
.
add
(
this
.
editorOptions
.
onDidChange
(
newValue
=>
editor
.
updateOptions
(
newValue
)));
disposables
.
add
(
this
.
editorOptions
.
onDidChange
(
newValue
=>
editor
.
updateOptions
(
newValue
)));
...
...
src/vs/workbench/contrib/notebook/browser/view/renderers/markdownCell.ts
浏览文件 @
0625bc30
...
@@ -189,7 +189,8 @@ export class StatefulMarkdownCell extends Disposable {
...
@@ -189,7 +189,8 @@ export class StatefulMarkdownCell extends Disposable {
dimension
:
{
dimension
:
{
width
:
width
,
width
:
width
,
height
:
editorHeight
height
:
editorHeight
}
},
overflowWidgetsDomNode
:
this
.
notebookEditor
.
getOverflowContainerDomNode
()
},
{});
},
{});
this
.
templateData
.
currentEditor
=
this
.
editor
;
this
.
templateData
.
currentEditor
=
this
.
editor
;
...
...
src/vs/workbench/contrib/notebook/test/testNotebookEditor.ts
浏览文件 @
0625bc30
...
@@ -103,6 +103,10 @@ export class TestNotebookEditor implements INotebookEditor {
...
@@ -103,6 +103,10 @@ export class TestNotebookEditor implements INotebookEditor {
throw
new
Error
(
'
Method not implemented.
'
);
throw
new
Error
(
'
Method not implemented.
'
);
}
}
getOverflowContainerDomNode
():
HTMLElement
{
throw
new
Error
(
'
Method not implemented.
'
);
}
private
_onDidChangeModel
=
new
Emitter
<
NotebookTextModel
|
undefined
>
();
private
_onDidChangeModel
=
new
Emitter
<
NotebookTextModel
|
undefined
>
();
onDidChangeModel
:
Event
<
NotebookTextModel
|
undefined
>
=
this
.
_onDidChangeModel
.
event
;
onDidChangeModel
:
Event
<
NotebookTextModel
|
undefined
>
=
this
.
_onDidChangeModel
.
event
;
getContribution
<
T
extends
INotebookEditorContribution
>
(
id
:
string
):
T
{
getContribution
<
T
extends
INotebookEditorContribution
>
(
id
:
string
):
T
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录