Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
209c2e72
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,发现更多精彩内容 >>
提交
209c2e72
编写于
3月 02, 2020
作者:
R
rebornix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
List Output resize flashing.
上级
e0b9c763
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
24 addition
and
13 deletion
+24
-13
src/vs/base/browser/ui/list/listView.ts
src/vs/base/browser/ui/list/listView.ts
+4
-0
src/vs/workbench/contrib/notebook/browser/renderers/backLayerWebView.ts
...ch/contrib/notebook/browser/renderers/backLayerWebView.ts
+1
-2
src/vs/workbench/contrib/notebook/browser/renderers/cellRenderer.ts
...kbench/contrib/notebook/browser/renderers/cellRenderer.ts
+4
-0
src/vs/workbench/contrib/notebook/browser/renderers/cellViewModel.ts
...bench/contrib/notebook/browser/renderers/cellViewModel.ts
+7
-7
src/vs/workbench/contrib/notebook/browser/renderers/codeCell.ts
.../workbench/contrib/notebook/browser/renderers/codeCell.ts
+8
-4
未找到文件。
src/vs/base/browser/ui/list/listView.ts
浏览文件 @
209c2e72
...
...
@@ -1134,6 +1134,10 @@ export class ListView<T> implements ISpliceable<T>, IDisposable {
return
0
;
}
if
(
!!
this
.
virtualDelegate
.
hasDynamicHeight
&&
!
this
.
virtualDelegate
.
hasDynamicHeight
(
item
.
element
))
{
return
0
;
}
const
size
=
item
.
size
;
if
(
item
.
row
&&
item
.
row
.
domNode
)
{
...
...
src/vs/workbench/contrib/notebook/browser/renderers/backLayerWebView.ts
浏览文件 @
209c2e72
...
...
@@ -271,8 +271,7 @@ export class BackLayerWebView extends Disposable {
let
outputIndex
=
cell
.
outputs
.
indexOf
(
output
);
cell
.
updateOutputHeight
(
outputIndex
,
outputHeight
);
let
totalOutputHeight
=
cell
.
getOutputTotalHeight
();
cell
.
dynamicHeight
=
editorHeight
+
32
/* code cell padding */
+
totalOutputHeight
;
this
.
notebookEditor
.
layoutNotebookCell
(
cell
,
cell
.
dynamicHeight
);
this
.
notebookEditor
.
layoutNotebookCell
(
cell
,
editorHeight
+
32
/* code cell padding */
+
totalOutputHeight
);
}
}
else
if
(
data
.
type
===
'
scroll-ack
'
)
{
// const date = new Date();
...
...
src/vs/workbench/contrib/notebook/browser/renderers/cellRenderer.ts
浏览文件 @
209c2e72
...
...
@@ -311,6 +311,10 @@ export class CodeCellRenderer extends AbstractCellRenderer implements IListRende
}
renderElement
(
element
:
CellViewModel
,
index
:
number
,
templateData
:
CellRenderTemplate
,
height
:
number
|
undefined
):
void
{
if
(
height
===
undefined
)
{
return
;
}
if
(
templateData
.
outputContainer
)
{
templateData
.
outputContainer
!
.
innerHTML
=
''
;
}
...
...
src/vs/workbench/contrib/notebook/browser/renderers/cellViewModel.ts
浏览文件 @
209c2e72
...
...
@@ -21,7 +21,6 @@ export class CellViewModel extends Disposable {
private
_mdRenderer
:
MarkdownRenderer
|
null
=
null
;
private
_html
:
HTMLElement
|
null
=
null
;
private
_dynamicHeight
:
number
|
null
=
null
;
protected
readonly
_onDidDispose
=
new
Emitter
<
void
>
();
readonly
onDidDispose
=
this
.
_onDidDispose
.
event
;
protected
readonly
_onDidChangeEditingState
=
new
Emitter
<
void
>
();
...
...
@@ -49,14 +48,15 @@ export class CellViewModel extends Disposable {
this
.
_onDidChangeEditingState
.
fire
();
}
set
dynamicHeight
(
height
:
number
|
null
)
{
this
.
_dynamicHeight
=
height
;
}
private
_selfSizeMonitoring
:
boolean
=
false
;
get
dynamicHeight
():
number
|
null
{
return
this
.
_dynamicHeight
;
set
selfSizeMonitoring
(
newVal
:
boolean
)
{
this
.
_selfSizeMonitoring
=
newVal
;
}
get
selfSizeMonitoring
()
{
return
this
.
_selfSizeMonitoring
;
}
private
_editorHeight
=
0
;
set
editorHeight
(
height
:
number
)
{
...
...
@@ -146,7 +146,7 @@ export class CellViewModel extends Disposable {
//#endregion
hasDynamicHeight
()
{
if
(
this
.
_dynamicHeight
!==
null
)
{
if
(
this
.
selfSizeMonitoring
)
{
// if there is an output rendered in the webview, it should always be false
return
false
;
}
...
...
src/vs/workbench/contrib/notebook/browser/renderers/codeCell.ts
浏览文件 @
209c2e72
...
...
@@ -104,16 +104,18 @@ export class CodeCell extends Disposable {
this
.
_register
(
templateData
.
editor
!
.
onDidContentSizeChange
((
e
)
=>
{
if
(
e
.
contentHeightChanged
)
{
let
layout
=
templateData
.
editor
!
.
getLayoutInfo
();
if
(
layout
.
h
eight
!==
e
.
contentHeight
)
{
let
currContentHeight
=
templateData
.
editor
!
.
getContentHeight
();
if
(
currContentH
eight
!==
e
.
contentHeight
)
{
templateData
.
editor
?.
layout
(
{
width
:
layout
.
width
,
width
:
currContentHeight
,
height
:
e
.
contentHeight
}
);
}
if
(
viewCell
.
editorHeight
!==
currContentHeight
)
{
viewCell
.
editorHeight
=
e
.
contentHeight
;
if
(
viewCell
.
outputs
.
length
)
{
...
...
@@ -122,7 +124,9 @@ export class CodeCell extends Disposable {
}
else
{
notebookEditor
.
layoutNotebookCell
(
viewCell
,
viewCell
.
editorHeight
+
32
);
}
}
}
}));
...
...
@@ -252,6 +256,7 @@ export class CodeCell extends Disposable {
}
if
(
result
.
shadowContent
)
{
this
.
viewCell
.
selfSizeMonitoring
=
true
;
let
editorHeight
=
this
.
viewCell
.
editorHeight
;
this
.
notebookEditor
.
createInset
(
this
.
viewCell
,
currOutput
,
result
.
shadowContent
,
editorHeight
+
8
+
this
.
viewCell
.
getOutputOffset
(
index
));
}
else
{
...
...
@@ -284,7 +289,6 @@ export class CodeCell extends Disposable {
this
.
viewCell
.
updateOutputHeight
(
currIndex
,
height
);
const
editorHeight
=
this
.
viewCell
.
editorHeight
;
const
totalOutputHeight
=
this
.
viewCell
.
getOutputTotalHeight
();
this
.
viewCell
.
dynamicHeight
=
editorHeight
+
32
+
totalOutputHeight
;
this
.
notebookEditor
.
layoutNotebookCell
(
this
.
viewCell
,
editorHeight
+
32
+
totalOutputHeight
);
}
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录