Skip to content

Commit 75befc2

Browse files
committed
cleaning the code
1 parent 994e9bf commit 75befc2

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/vs/editor/contrib/hover/browser/contentHover.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -772,13 +772,6 @@ export class ResizableHoverWidget extends MultiplePersistedSizeResizableContentW
772772
}
773773
}
774774

775-
private _setResizableDomNodeDimensions(width: number, height: number): void {
776-
this._resizableNode.layout(height, width);
777-
const resizableDomNode = this._resizableNode.domNode;
778-
resizableDomNode.style.width = `${width}px`;
779-
resizableDomNode.style.height = `${height}px`;
780-
}
781-
782775
private _setPersistedHoverDimensionsOrRenderNormally(): void {
783776
const persistedSize = this.findPersistedSize();
784777
// Suppose a persisted size is defined
@@ -789,7 +782,7 @@ export class ResizableHoverWidget extends MultiplePersistedSizeResizableContentW
789782
} else {
790783
// Added because otherwise the initial size of the hover content is smaller than should be
791784
const layoutInfo = this._editor.getLayoutInfo();
792-
this._setResizableDomNodeDimensions(layoutInfo.width, layoutInfo.height);
785+
this._resizableNode.layout(layoutInfo.height, layoutInfo.width);
793786
this._setHoverWidgetDimensions('auto', 'auto');
794787
// Added otherwise rendered too small horizontally
795788
const containerDomNode = this._hoverWidget.containerDomNode;
@@ -821,7 +814,7 @@ export class ResizableHoverWidget extends MultiplePersistedSizeResizableContentW
821814
const containerDomNode = this._hoverWidget.containerDomNode;
822815
const clientHeight = containerDomNode.clientHeight;
823816
const clientWidth = containerDomNode.clientWidth;
824-
this._setResizableDomNodeDimensions(clientWidth + 2 * SASH_WIDTH_MINUS_BORDER, clientHeight + 2 * SASH_WIDTH_MINUS_BORDER);
817+
this._resizableNode.layout(clientHeight + 2 * SASH_WIDTH_MINUS_BORDER, clientWidth + 2 * SASH_WIDTH_MINUS_BORDER);
825818
this._setContainerAbsolutePosition(SASH_WIDTH_MINUS_BORDER - 1, SASH_WIDTH_MINUS_BORDER - 1);
826819
if (this._hasHorizontalScrollbar()) {
827820
this._adjustContentsBottomPadding();

0 commit comments

Comments
 (0)