提交 e5007182 编写于 作者: R rebornix

do not override editor width when there is no notebook width change

上级 0902df9d
......@@ -66,10 +66,10 @@ export class MarkdownCellViewModel extends BaseCellViewModel implements ICellVie
layoutChange(state: MarkdownCellLayoutChangeEvent) {
// recompute
const editorWidth = state.outerWidth !== undefined ? state.outerWidth - CELL_MARGIN * 2 - CELL_RUN_GUTTER : 0;
const editorWidth = state.outerWidth !== undefined ? state.outerWidth - CELL_MARGIN * 2 - CELL_RUN_GUTTER : this._layoutInfo.editorWidth;
this._layoutInfo = {
fontInfo: state.font || null,
fontInfo: state.font || this._layoutInfo.fontInfo,
editorWidth,
bottomToolbarOffset: BOTTOM_CELL_TOOLBAR_HEIGHT,
totalHeight: state.totalHeight === undefined ? this._layoutInfo.totalHeight : state.totalHeight
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册