File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -573,8 +573,9 @@ export class CommentNode<T extends IRange | ICellRange> extends Disposable {
573
573
this . _commentEditContainer ! . remove ( ) ;
574
574
}
575
575
576
- layout ( ) {
577
- this . _commentEditor ?. layout ( { width : this . _commentEditor . getLayoutInfo ( ) . width , height : this . _editorHeight } ) ;
576
+ layout ( widthInPixel ?: number ) {
577
+ const editorWidth = widthInPixel !== undefined ? widthInPixel - 72 /* - margin and scrollbar*/ : ( this . _commentEditor ?. getLayoutInfo ( ) . width ?? 0 ) ;
578
+ this . _commentEditor ?. layout ( { width : editorWidth , height : this . _editorHeight } ) ;
578
579
const scrollWidth = this . _body . scrollWidth ;
579
580
const width = dom . getContentWidth ( this . _body ) ;
580
581
const scrollHeight = this . _body . scrollHeight ;
Original file line number Diff line number Diff line change @@ -122,9 +122,9 @@ export class CommentThreadBody<T extends IRange | ICellRange = IRange> extends D
122
122
return dom . getClientArea ( this . container ) ;
123
123
}
124
124
125
- layout ( ) {
125
+ layout ( widthInPixel ?: number ) {
126
126
this . _commentElements . forEach ( element => {
127
- element . layout ( ) ;
127
+ element . layout ( widthInPixel ) ;
128
128
} ) ;
129
129
}
130
130
Original file line number Diff line number Diff line change @@ -342,7 +342,7 @@ export class CommentThreadWidget<T extends IRange | ICellRange = IRange> extends
342
342
}
343
343
344
344
layout ( widthInPixel ?: number ) {
345
- this . _body . layout ( ) ;
345
+ this . _body . layout ( widthInPixel ) ;
346
346
347
347
if ( widthInPixel !== undefined ) {
348
348
this . _commentReply ?. layout ( widthInPixel ) ;
You can’t perform that action at this time.
0 commit comments