提交 94094e2a 编写于 作者: B Benjamin Pasero

grid - fix to set height: 100% on editor container

上级 65488b26
......@@ -38,12 +38,7 @@
overflow: hidden;
}
.monaco-workbench > .part.editor > .content .editor-group-container > .editor-container {
height: calc(100% - 35px); /* below title control */
}
.monaco-workbench > .part.editor > .content .editor-group-container.empty > .title,
.monaco-workbench > .part.editor > .content .editor-group-container.empty > .editor-container {
.monaco-workbench > .part.editor > .content .editor-group-container.empty > .title {
display: none;
}
......@@ -79,4 +74,18 @@
.vs-dark .monaco-workbench > .part.editor > .content .editor-group-container > .editor-group-container-toolbar .close-editor-group,
.hc-black .monaco-workbench > .part.editor > .content .editor-group-container > .editor-group-container-toolbar .close-editor-group {
background-image: url('close-inverse.svg');
}
/* Editor */
.monaco-workbench > .part.editor > .content .editor-group-container > .editor-container {
height: calc(100% - 35px); /* below title control */
}
.monaco-workbench > .part.editor > .content .editor-group-container.empty > .editor-container {
display: none;
}
.monaco-workbench > .part.editor > .content .editor-group-container > .editor-container > .editor-instance {
height: 100%;
}
\ No newline at end of file
......@@ -7,7 +7,7 @@
import { Disposable } from 'vs/base/common/lifecycle';
import { EditorInput, EditorOptions } from 'vs/workbench/common/editor';
import { Dimension, show, hide } from 'vs/base/browser/dom';
import { Dimension, show, hide, addClass } from 'vs/base/browser/dom';
import { Registry } from 'vs/platform/registry/common/platform';
import { IEditorRegistry, Extensions as EditorExtensions, IEditorDescriptor } from 'vs/workbench/browser/editor';
import { TPromise } from 'vs/base/common/winjs.base';
......@@ -95,6 +95,7 @@ export class NextEditorControl extends Disposable {
// Create editor container as needed
if (!control.getContainer()) {
const controlInstanceContainer = document.createElement('div');
addClass(controlInstanceContainer, 'editor-instance');
controlInstanceContainer.id = descriptor.getId();
control.create(controlInstanceContainer);
......
......@@ -63,7 +63,7 @@ export class Application {
async start(): Promise<any> {
await this._start();
await this.code.waitForElement('.explorer-folders-view');
await this.code.waitForActiveElement(`.editor-container[id="workbench.editor.walkThroughPart"] > div > div[tabIndex="0"]`);
await this.code.waitForActiveElement(`.editor-instance[id="workbench.editor.walkThroughPart"] > div > div[tabIndex="0"]`);
}
async restart(options: { workspaceOrFolder?: string, extraArgs?: string[] }): Promise<any> {
......
......@@ -23,7 +23,7 @@ export class Editors {
}
async waitForActiveEditor(filename: string): Promise<any> {
const selector = `.editor-container .monaco-editor[data-uri$="${filename}"] textarea`;
const selector = `.editor-instance .monaco-editor[data-uri$="${filename}"] textarea`;
return this.code.waitForActiveElement(selector);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册