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

rename contentDimension

上级 b8bb6558
...@@ -199,8 +199,8 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro ...@@ -199,8 +199,8 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
//#region IEditorGroupsService //#region IEditorGroupsService
private _dimension: Dimension; private _contentDimension: Dimension;
get dimension(): Dimension { return this._dimension; } get contentDimension(): Dimension { return this._contentDimension; }
get activeGroup(): IEditorGroupView { get activeGroup(): IEditorGroupView {
return this._activeGroup; return this._activeGroup;
...@@ -409,7 +409,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro ...@@ -409,7 +409,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
this.doCreateGridControlWithState(gridDescriptor, activeGroup.id, currentGroupViews); this.doCreateGridControlWithState(gridDescriptor, activeGroup.id, currentGroupViews);
// Layout // Layout
this.doLayout(this._dimension); this.doLayout(this._contentDimension);
// Update container // Update container
this.updateContainer(); this.updateContainer();
...@@ -933,10 +933,10 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro ...@@ -933,10 +933,10 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
} }
private doLayout(dimension: Dimension): void { private doLayout(dimension: Dimension): void {
this._dimension = dimension; this._contentDimension = dimension;
// Layout Grid // Layout Grid
this.centeredLayoutWidget.layout(this._dimension.width, this._dimension.height); this.centeredLayoutWidget.layout(this._contentDimension.width, this._contentDimension.height);
// Event // Event
this._onDidLayout.fire(dimension); this._onDidLayout.fire(dimension);
......
...@@ -173,7 +173,7 @@ export class WatermarkContribution extends Disposable implements IWorkbenchContr ...@@ -173,7 +173,7 @@ export class WatermarkContribution extends Disposable implements IWorkbenchContr
dom.prepend(container.firstElementChild as HTMLElement, this.watermark); dom.prepend(container.firstElementChild as HTMLElement, this.watermark);
this._register(this.keybindingService.onDidUpdateKeybindings(update)); this._register(this.keybindingService.onDidUpdateKeybindings(update));
this._register(this.editorGroupsService.onDidLayout(dimension => this.handleEditorPartSize(container, dimension))); 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 { private handleEditorPartSize(container: HTMLElement, dimension: IDimension): void {
...@@ -214,4 +214,4 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration) ...@@ -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.") '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 { ...@@ -179,7 +179,7 @@ export interface IEditorGroupsService {
/** /**
* The size of the editor groups area. * 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. * An active group is the default location for new editors to open.
......
...@@ -667,7 +667,7 @@ export class TestEditorGroupsService implements IEditorGroupsService { ...@@ -667,7 +667,7 @@ export class TestEditorGroupsService implements IEditorGroupsService {
whenRestored: Promise<void> = Promise.resolve(undefined); whenRestored: Promise<void> = Promise.resolve(undefined);
willRestoreEditors = false; willRestoreEditors = false;
dimension = { width: 800, height: 600 }; contentDimension = { width: 800, height: 600 };
get activeGroup(): IEditorGroup { get activeGroup(): IEditorGroup {
return this.groups[0]; return this.groups[0];
...@@ -1622,4 +1622,4 @@ export class RemoteFileSystemProvider implements IFileSystemProvider { ...@@ -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); } 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: '' }); } 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.
先完成此消息的编辑!
想要评论请 注册