提交 7d6996b4 编写于 作者: R rebornix

Cell View State restore

上级 6e7c820c
......@@ -428,8 +428,8 @@ export class NotebookEditor extends BaseEditor implements INotebookEditor {
if (this.list) {
state.scrollPosition = { left: this.list.scrollLeft, top: this.list.scrollTop };
let cellHeights: { [key: number]: number } = {};
for (let i = 0; i < this.list.length; i++) {
const elm = this.list.element(i)!;
for (let i = 0; i < this.viewModel!.viewCells.length; i++) {
const elm = this.viewModel!.viewCells[i] as CellViewModel;
if (elm.cellKind === CellKind.Code) {
cellHeights[i] = elm.layoutInfo.totalHeight;
} else {
......
......@@ -9,7 +9,7 @@ import { CellKind, IOutput, CellUri, NotebookCellMetadata } from 'vs/workbench/c
import { NotebookViewModel, IModelDecorationsChangeAccessor, CellViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { NotebookEditorModel } from 'vs/workbench/contrib/notebook/browser/notebookEditorInput';
import { INotebookEditor, NotebookLayoutInfo, ICellViewModel } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
import { INotebookEditor, NotebookLayoutInfo, ICellViewModel, ICellRange } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
import { IMouseWheelEvent } from 'vs/base/browser/mouseEvent';
import { OutputRenderer } from 'vs/workbench/contrib/notebook/browser/view/output/outputRenderer';
import { BareFontInfo } from 'vs/editor/common/config/fontInfo';
......@@ -49,6 +49,11 @@ export class TestNotebookEditor implements INotebookEditor {
constructor(
) { }
setHiddenAreas(_ranges: ICellRange[]): boolean {
throw new Error('Method not implemented.');
}
getInnerWebview(): Webview | undefined {
throw new Error('Method not implemented.');
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册