fixed the layout issue in model view containers (#1548)

* fixed the layout issue in model view containers

* fixed the sample
This commit is contained in:
Leila Lali
2018-06-04 14:25:41 -07:00
committed by GitHub
parent 473a414bc3
commit f70bf590cd
6 changed files with 20 additions and 57 deletions

View File

@@ -285,25 +285,14 @@ export default class MainController implements vscode.Disposable {
let webview = view.modelBuilder.webView()
.component();
let flexModel = view.modelBuilder.flexContainer()
.withLayout({
flexFlow: 'column',
alignItems: 'stretch',
height: '100%'
}).withItems([
toolbarModel, webview
], { flex: '1' })
.component();
// bug: #1531
// let flexModel = view.modelBuilder.flexContainer().component();
// flexModel.addItem(toolbarModel, { flex: '0' });
// flexModel.addItem(webview, { flex: '1' });
// flexModel.setLayout({
// flexFlow: 'column',
// alignItems: 'stretch',
// height: '100%'
// });
let flexModel = view.modelBuilder.flexContainer().component();
flexModel.addItem(toolbarModel, { flex: '0' });
flexModel.addItem(webview, { flex: '1' });
flexModel.setLayout({
flexFlow: 'column',
alignItems: 'stretch',
height: '100%'
});
let templateValues = {url: 'http://whoisactive.com/docs/'};
Utils.renderTemplateHtml(path.join(__dirname, '..'), 'templateTab.html', templateValues)