@@ -480,12 +480,12 @@ export class ContentHoverWidget extends ResizableContentWidget {
480
480
}
481
481
482
482
constructor (
483
- _editor : ICodeEditor ,
484
- @IContextKeyService _contextKeyService : IContextKeyService
483
+ editor : ICodeEditor ,
484
+ @IContextKeyService contextKeyService : IContextKeyService
485
485
) {
486
- super ( _editor ) ;
487
- this . _hoverVisibleKey = EditorContextKeys . hoverVisible . bindTo ( _contextKeyService ) ;
488
- this . _hoverFocusedKey = EditorContextKeys . hoverFocused . bindTo ( _contextKeyService ) ;
486
+ super ( editor ) ;
487
+ this . _hoverVisibleKey = EditorContextKeys . hoverVisible . bindTo ( contextKeyService ) ;
488
+ this . _hoverFocusedKey = EditorContextKeys . hoverFocused . bindTo ( contextKeyService ) ;
489
489
490
490
dom . append ( this . _resizableNode . domNode , this . _hover . containerDomNode ) ;
491
491
this . _resizableNode . domNode . style . zIndex = '50' ;
@@ -518,30 +518,30 @@ export class ContentHoverWidget extends ResizableContentWidget {
518
518
return ContentHoverWidget . ID ;
519
519
}
520
520
521
- private _setDimensions ( container : HTMLElement , width : number | string , height : number | string ) {
521
+ private static _applyDimensions ( container : HTMLElement , width : number | string , height : number | string ) : void {
522
522
const transformedWidth = typeof width === 'number' ? `${ width } px` : width ;
523
523
const transformedHeight = typeof height === 'number' ? `${ height } px` : height ;
524
524
container . style . width = transformedWidth ;
525
525
container . style . height = transformedHeight ;
526
526
}
527
527
528
- private _setContentsDomNodeDimensions ( width : number | string , height : number | string ) {
528
+ private _setContentsDomNodeDimensions ( width : number | string , height : number | string ) : void {
529
529
const contentsDomNode = this . _hover . contentsDomNode ;
530
- return this . _setDimensions ( contentsDomNode , width , height ) ;
530
+ return ContentHoverWidget . _applyDimensions ( contentsDomNode , width , height ) ;
531
531
}
532
532
533
- private _setContainerDomNodeDimensions ( width : number | string , height : number | string ) {
533
+ private _setContainerDomNodeDimensions ( width : number | string , height : number | string ) : void {
534
534
const containerDomNode = this . _hover . containerDomNode ;
535
- return this . _setDimensions ( containerDomNode , width , height ) ;
535
+ return ContentHoverWidget . _applyDimensions ( containerDomNode , width , height ) ;
536
536
}
537
537
538
- private _setHoverWidgetDimensions ( width : number | string , height : number | string ) {
538
+ private _setHoverWidgetDimensions ( width : number | string , height : number | string ) : void {
539
539
this . _setContentsDomNodeDimensions ( width , height ) ;
540
540
this . _setContainerDomNodeDimensions ( width , height ) ;
541
541
this . _layoutContentWidget ( ) ;
542
542
}
543
543
544
- private _setContentsDomNodeMaxDimensions ( width : number | string , height : number | string ) {
544
+ private _setContentsDomNodeMaxDimensions ( width : number | string , height : number | string ) : void {
545
545
const transformedWidth = typeof width === 'number' ? `${ width } px` : width ;
546
546
const transformedHeight = typeof height === 'number' ? `${ height } px` : height ;
547
547
const contentsDomNode = this . _hover . contentsDomNode ;
@@ -555,7 +555,7 @@ export class ContentHoverWidget extends ResizableContentWidget {
555
555
return hasHorizontalScrollbar ;
556
556
}
557
557
558
- private _adjustContentsBottomPadding ( ) {
558
+ private _adjustContentsBottomPadding ( ) : void {
559
559
const contentsDomNode = this . _hover . contentsDomNode ;
560
560
const extraBottomPadding = `${ this . _hover . scrollbar . options . horizontalScrollbarSize } px` ;
561
561
if ( contentsDomNode . style . paddingBottom !== extraBottomPadding ) {
@@ -575,13 +575,13 @@ export class ContentHoverWidget extends ResizableContentWidget {
575
575
}
576
576
}
577
577
578
- private _setResizableNodeMaxDimensions ( ) {
578
+ private _setResizableNodeMaxDimensions ( ) : void {
579
579
const maxRenderingWidth = this . _findMaximumRenderingWidth ( ) ?? Infinity ;
580
580
const maxRenderingHeight = this . _findMaximumRenderingHeight ( ) ?? Infinity ;
581
581
this . _resizableNode . maxSize = new dom . Dimension ( maxRenderingWidth , maxRenderingHeight ) ;
582
582
}
583
583
584
- override _resize ( size : dom . Dimension ) {
584
+ override _resize ( size : dom . Dimension ) : void {
585
585
this . _setAdjustedHoverWidgetDimensions ( size ) ;
586
586
this . _resizableNode . layout ( size . height , size . width ) ;
587
587
this . _setResizableNodeMaxDimensions ( ) ;
0 commit comments