提交 1fd0d453 编写于 作者: J Joao Moreno

rename contentDimension

上级 b8bb6558
......@@ -199,8 +199,8 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
//#region IEditorGroupsService
private _dimension: Dimension;
get dimension(): Dimension { return this._dimension; }
private _contentDimension: Dimension;
get contentDimension(): Dimension { return this._contentDimension; }
get activeGroup(): IEditorGroupView {
return this._activeGroup;
......@@ -409,7 +409,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
this.doCreateGridControlWithState(gridDescriptor, activeGroup.id, currentGroupViews);
// Layout
this.doLayout(this._dimension);
this.doLayout(this._contentDimension);
// Update container
this.updateContainer();
......@@ -933,10 +933,10 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
}
private doLayout(dimension: Dimension): void {
this._dimension = dimension;
this._contentDimension = dimension;
// Layout Grid
this.centeredLayoutWidget.layout(this._dimension.width, this._dimension.height);
this.centeredLayoutWidget.layout(this._contentDimension.width, this._contentDimension.height);
// Event
this._onDidLayout.fire(dimension);
......
......@@ -173,7 +173,7 @@ export class WatermarkContribution extends Disposable implements IWorkbenchContr
dom.prepend(container.firstElementChild as HTMLElement, this.watermark);
this._register(this.keybindingService.onDidUpdateKeybindings(update));
this._register(this.editorGroupsService.onDidLayout(dimension => this.handleEditorPartSize(container, dimension)));
this.handleEditorPartSize(container, this.editorGroupsService.dimension);
this.handleEditorPartSize(container, this.editorGroupsService.contentDimension);
}
private handleEditorPartSize(container: HTMLElement, dimension: IDimension): void {
......@@ -214,4 +214,4 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
'description': nls.localize('tips.enabled', "When enabled, will show the watermark tips when no editor is open.")
},
}
});
\ No newline at end of file
});
......@@ -179,7 +179,7 @@ export interface IEditorGroupsService {
/**
* The size of the editor groups area.
*/
readonly dimension: IDimension;
readonly contentDimension: IDimension;
/**
* An active group is the default location for new editors to open.
......
......@@ -667,7 +667,7 @@ export class TestEditorGroupsService implements IEditorGroupsService {
whenRestored: Promise<void> = Promise.resolve(undefined);
willRestoreEditors = false;
dimension = { width: 800, height: 600 };
contentDimension = { width: 800, height: 600 };
get activeGroup(): IEditorGroup {
return this.groups[0];
......@@ -1622,4 +1622,4 @@ export class RemoteFileSystemProvider implements IFileSystemProvider {
write(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number> { return this.diskFileSystemProvider.write!(fd, pos, data, offset, length); }
private toFileResource(resource: URI): URI { return resource.with({ scheme: Schemas.file, authority: '' }); }
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册