提交 82b09e61 编写于 作者: B Benjamin Pasero

grid - change getViewSize to just return one dimension

上级 68624f14
......@@ -187,9 +187,11 @@ export class Grid<T extends IView> implements IDisposable {
return this.gridview.resizeView(location, size);
}
getViewSize(view: T): { width: number; height: number; } {
getViewSize(view: T): number {
const location = this.getViewLocation(view);
return this.gridview.getViewSize(location);
const viewSize = this.gridview.getViewSize(location);
return getLocationOrientation(this.orientation, location) === Orientation.HORIZONTAL ? viewSize.width : viewSize.height;
}
getViews(): GridBranchNode<T> {
......
......@@ -196,11 +196,9 @@ export class NextEditorPart extends Part implements INextEditorGroupsService, IN
resizeGroup(group: INextEditorGroupView | GroupIdentifier, sizeDelta: number): INextEditorGroupView {
const groupView = this.assertGroupView(group);
const currentSize = this.gridWidget.getViewSize(groupView);
const currentOrientation = this.gridWidget.getOrientation(groupView);
this.gridWidget.resizeView(groupView, currentOrientation === Orientation.HORIZONTAL ? currentSize.width + sizeDelta : currentSize.height + sizeDelta);
this.gridWidget.resizeView(groupView, currentSize + sizeDelta);
return groupView;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册