提交 ddb66419 编写于 作者: R Rob Lourens

Don't set the markdown cell height based on the height

上级 2f18a781
......@@ -414,31 +414,31 @@ export class MarkdownCellRenderer extends AbstractCellRenderer implements IListR
templateData.cellContainer.appendChild(renderedHTML);
}
if (height) {
const elementDisposables = templateData.elementDisposables;
if (height === undefined) {
return;
}
elementDisposables.add(new CellContextKeyManager(templateData.contextKeyService, this.notebookEditor.viewModel?.notebookDocument!, element));
const elementDisposables = templateData.elementDisposables;
// render toolbar first
this.setupCellToolbarActions(templateData.contextKeyService, templateData, elementDisposables);
elementDisposables.add(new CellContextKeyManager(templateData.contextKeyService, this.notebookEditor.viewModel?.notebookDocument!, element));
const toolbarContext = <INotebookCellActionContext>{
cell: element,
notebookEditor: this.notebookEditor,
$mid: 12
};
templateData.toolbar.context = toolbarContext;
// render toolbar first
this.setupCellToolbarActions(templateData.contextKeyService, templateData, elementDisposables);
this.setBetweenCellToolbarContext(templateData, element, toolbarContext);
const toolbarContext = <INotebookCellActionContext>{
cell: element,
notebookEditor: this.notebookEditor,
$mid: 12
};
templateData.toolbar.context = toolbarContext;
const markdownCell = this.instantiationService.createInstance(StatefullMarkdownCell, this.notebookEditor, element, templateData, this.editorOptions.value, this.renderedEditors);
elementDisposables.add(this.editorOptions.onDidChange(newValue => markdownCell.updateEditorOptions(newValue)));
elementDisposables.add(markdownCell);
this.setBetweenCellToolbarContext(templateData, element, toolbarContext);
element.totalHeight = height;
const markdownCell = this.instantiationService.createInstance(StatefullMarkdownCell, this.notebookEditor, element, templateData, this.editorOptions.value, this.renderedEditors);
elementDisposables.add(this.editorOptions.onDidChange(newValue => markdownCell.updateEditorOptions(newValue)));
elementDisposables.add(markdownCell);
templateData.languageStatusBarItem.update(element, this.notebookEditor);
}
templateData.languageStatusBarItem.update(element, this.notebookEditor);
}
disposeTemplate(templateData: MarkdownCellRenderTemplate): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册