mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-13 21:47:12 -05:00
@@ -34,7 +34,7 @@ export const COMMENTEDITOR_DECORATION_KEY = 'commenteditordecoration';
|
||||
|
||||
export class CommentThreadWidget<T extends IRange | ICellRange = IRange> extends Disposable implements ICommentThreadWidget {
|
||||
private _header!: CommentThreadHeader<T>;
|
||||
private _body!: CommentThreadBody<T>;
|
||||
private _body: CommentThreadBody<T>;
|
||||
private _commentReply?: CommentReply<T>;
|
||||
private _additionalActions?: CommentThreadAdditionalActions<T>;
|
||||
private _commentMenus: CommentMenus;
|
||||
@@ -274,7 +274,7 @@ export class CommentThreadWidget<T extends IRange | ICellRange = IRange> extends
|
||||
}
|
||||
|
||||
getDimensions() {
|
||||
return this._body?.getDimensions();
|
||||
return this._body.getDimensions();
|
||||
}
|
||||
|
||||
layout(widthInPixel?: number) {
|
||||
|
||||
@@ -416,8 +416,12 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
|
||||
this._commentThreadWidget.submitComment();
|
||||
}
|
||||
|
||||
_refresh(dimensions?: dom.Dimension) {
|
||||
if (this._isExpanded && dimensions) {
|
||||
_refresh(dimensions: dom.Dimension) {
|
||||
if (dimensions.height === 0 && dimensions.width === 0) {
|
||||
this.commentThread.collapsibleState = languages.CommentThreadCollapsibleState.Collapsed;
|
||||
return;
|
||||
}
|
||||
if (this._isExpanded) {
|
||||
this._commentThreadWidget.layout();
|
||||
|
||||
const headHeight = Math.ceil(this.editor.getOption(EditorOption.lineHeight) * 1.2);
|
||||
|
||||
Reference in New Issue
Block a user