mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-04 09:35:38 -05:00
Fix horizontal split view not working (#23889)
* Horizontal splitview sorta working * remove the old element * support getting size from model view container * cleanup * make splitViewHeight optional * Update src/sql/azdata.proposed.d.ts Co-authored-by: Charles Gagnon <chgagnon@microsoft.com> * fix test --------- Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
@@ -57,21 +57,19 @@ export function createTwoComponentFlexContainer(view: azdata.ModelView, firstCom
|
||||
/**
|
||||
* Creates a vertical splitview
|
||||
* @param view
|
||||
* @param topComponent
|
||||
* @param bottomComponent
|
||||
* @param splitViewHeight
|
||||
* @param firstComponent
|
||||
* @param secondComponent
|
||||
* @param orientation orientation of the split view - horizontal or vertical
|
||||
* @returns Vertical SplitViewContainer with the top and bottom components
|
||||
*/
|
||||
export function createVerticalSplitView(view: azdata.ModelView, topComponent: azdata.Component, bottomComponent: azdata.Component, splitViewHeight: number): azdata.SplitViewContainer {
|
||||
// TODO: figure out why the horizontal spliview isn't working
|
||||
|
||||
export function createSplitView(view: azdata.ModelView, firstComponent: azdata.Component, secondComponent: azdata.Component, orientation: string): azdata.SplitViewContainer {
|
||||
const splitview = <azdata.SplitViewContainer>view.modelBuilder.splitViewContainer().component();
|
||||
splitview.addItem(topComponent);
|
||||
splitview.addItem(bottomComponent);
|
||||
splitview.addItem(firstComponent);
|
||||
splitview.addItem(secondComponent);
|
||||
|
||||
splitview.setLayout({
|
||||
orientation: 'vertical',
|
||||
splitViewHeight: splitViewHeight
|
||||
orientation: orientation,
|
||||
splitViewSize: undefined // setting this to undefined will default the splitview size to use the model view container's size
|
||||
});
|
||||
|
||||
return splitview;
|
||||
|
||||
Reference in New Issue
Block a user