Move helper functions into DOM (#10051)

* Move helper functions into DOM

* Add tests and comments
This commit is contained in:
Charles Gagnon
2020-04-17 13:21:35 -07:00
committed by GitHub
parent b02a5f9e49
commit ea310ff15d
17 changed files with 141 additions and 107 deletions

View File

@@ -13,6 +13,7 @@ import { Event } from 'vs/base/common/event';
import { SplitView, Orientation, Sizing, IView } from 'vs/base/browser/ui/splitview/splitview';
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
import { ILogService } from 'vs/platform/log/common/log';
import { convertSize, convertSizeToNumber } from 'sql/base/browser/dom';
class SplitPane implements IView {
orientation: Orientation;
@@ -105,10 +106,10 @@ export default class SplitViewContainer extends ContainerBase<FlexItemLayout> im
this._alignContent = layout.alignContent ? layout.alignContent : '';
this._textAlign = layout.textAlign ? layout.textAlign : '';
this._position = layout.position ? layout.position : '';
this._height = this.convertSize(layout.height);
this._width = this.convertSize(layout.width);
this._height = convertSize(layout.height);
this._width = convertSize(layout.width);
this._orientation = layout.orientation.toLowerCase() === 'vertical' ? Orientation.VERTICAL : Orientation.HORIZONTAL;
this._splitViewHeight = this.convertSizeToNumber(layout.splitViewHeight);
this._splitViewHeight = convertSizeToNumber(layout.splitViewHeight);
if (this._componentWrappers) {
this._componentWrappers.forEach(item => {