mirror of
https://github.com/mathuo/dockview
synced 2025-08-28 13:06:28 +00:00
Merge pull request #690 from mathuo/640-panel-and-group-default-sizes-and-bounding-dimensions
640 panel and group default sizes and bounding dimensions
This commit is contained in:
commit
d519c239e3
@ -732,6 +732,7 @@ describe('dockviewComponent', () => {
|
|||||||
panel1: {
|
panel1: {
|
||||||
id: 'panel1',
|
id: 'panel1',
|
||||||
contentComponent: 'default',
|
contentComponent: 'default',
|
||||||
|
tabComponent: 'tab-default',
|
||||||
title: 'panel1',
|
title: 'panel1',
|
||||||
},
|
},
|
||||||
panel2: {
|
panel2: {
|
||||||
@ -743,22 +744,26 @@ describe('dockviewComponent', () => {
|
|||||||
id: 'panel3',
|
id: 'panel3',
|
||||||
contentComponent: 'default',
|
contentComponent: 'default',
|
||||||
title: 'panel3',
|
title: 'panel3',
|
||||||
|
renderer: 'onlyWhenVisible',
|
||||||
},
|
},
|
||||||
panel4: {
|
panel4: {
|
||||||
id: 'panel4',
|
id: 'panel4',
|
||||||
contentComponent: 'default',
|
contentComponent: 'default',
|
||||||
title: 'panel4',
|
title: 'panel4',
|
||||||
|
renderer: 'always',
|
||||||
},
|
},
|
||||||
panel5: {
|
panel5: {
|
||||||
id: 'panel5',
|
id: 'panel5',
|
||||||
contentComponent: 'default',
|
contentComponent: 'default',
|
||||||
title: 'panel5',
|
title: 'panel5',
|
||||||
|
minimumHeight: 100,
|
||||||
|
maximumHeight: 1000,
|
||||||
|
minimumWidth: 200,
|
||||||
|
maximumWidth: 2000,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// dockview.layout(1000, 1000, true);
|
|
||||||
|
|
||||||
expect(JSON.parse(JSON.stringify(dockview.toJSON()))).toEqual({
|
expect(JSON.parse(JSON.stringify(dockview.toJSON()))).toEqual({
|
||||||
activeGroup: 'group-1',
|
activeGroup: 'group-1',
|
||||||
grid: {
|
grid: {
|
||||||
@ -818,6 +823,7 @@ describe('dockviewComponent', () => {
|
|||||||
panel1: {
|
panel1: {
|
||||||
id: 'panel1',
|
id: 'panel1',
|
||||||
contentComponent: 'default',
|
contentComponent: 'default',
|
||||||
|
tabComponent: 'tab-default',
|
||||||
title: 'panel1',
|
title: 'panel1',
|
||||||
},
|
},
|
||||||
panel2: {
|
panel2: {
|
||||||
@ -829,16 +835,22 @@ describe('dockviewComponent', () => {
|
|||||||
id: 'panel3',
|
id: 'panel3',
|
||||||
contentComponent: 'default',
|
contentComponent: 'default',
|
||||||
title: 'panel3',
|
title: 'panel3',
|
||||||
|
renderer: 'onlyWhenVisible',
|
||||||
},
|
},
|
||||||
panel4: {
|
panel4: {
|
||||||
id: 'panel4',
|
id: 'panel4',
|
||||||
contentComponent: 'default',
|
contentComponent: 'default',
|
||||||
title: 'panel4',
|
title: 'panel4',
|
||||||
|
renderer: 'always',
|
||||||
},
|
},
|
||||||
panel5: {
|
panel5: {
|
||||||
id: 'panel5',
|
id: 'panel5',
|
||||||
contentComponent: 'default',
|
contentComponent: 'default',
|
||||||
title: 'panel5',
|
title: 'panel5',
|
||||||
|
minimumHeight: 100,
|
||||||
|
maximumHeight: 1000,
|
||||||
|
minimumWidth: 200,
|
||||||
|
maximumWidth: 2000,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -57,6 +57,10 @@ export class DefaultDockviewDeserialzier implements IPanelDeserializer {
|
|||||||
view,
|
view,
|
||||||
{
|
{
|
||||||
renderer: panelData.renderer,
|
renderer: panelData.renderer,
|
||||||
|
minimumWidth: panelData.minimumWidth,
|
||||||
|
minimumHeight: panelData.minimumHeight,
|
||||||
|
maximumWidth: panelData.maximumWidth,
|
||||||
|
maximumHeight: panelData.maximumHeight,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ import {
|
|||||||
SerializedGridObject,
|
SerializedGridObject,
|
||||||
getGridLocation,
|
getGridLocation,
|
||||||
ISerializedLeafNode,
|
ISerializedLeafNode,
|
||||||
|
orthogonal,
|
||||||
} from '../gridview/gridview';
|
} from '../gridview/gridview';
|
||||||
import {
|
import {
|
||||||
directionToPosition,
|
directionToPosition,
|
||||||
@ -1371,6 +1372,11 @@ export class DockviewComponent
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const initial = {
|
||||||
|
width: options.initialWidth,
|
||||||
|
height: options.initialHeight,
|
||||||
|
};
|
||||||
|
|
||||||
if (options.position) {
|
if (options.position) {
|
||||||
if (isPanelOptionsWithPanel(options.position)) {
|
if (isPanelOptionsWithPanel(options.position)) {
|
||||||
const referencePanel =
|
const referencePanel =
|
||||||
@ -1412,6 +1418,11 @@ export class DockviewComponent
|
|||||||
this.doSetGroupAndPanelActive(group);
|
this.doSetGroupAndPanelActive(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
group.api.setSize({
|
||||||
|
height: initial?.height,
|
||||||
|
width: initial?.width,
|
||||||
|
});
|
||||||
|
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1458,6 +1469,11 @@ export class DockviewComponent
|
|||||||
skipSetGroupActive: options.inactive,
|
skipSetGroupActive: options.inactive,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
referenceGroup.api.setSize({
|
||||||
|
width: initial?.width,
|
||||||
|
height: initial?.height,
|
||||||
|
});
|
||||||
|
|
||||||
if (!options.inactive) {
|
if (!options.inactive) {
|
||||||
this.doSetGroupAndPanelActive(referenceGroup);
|
this.doSetGroupAndPanelActive(referenceGroup);
|
||||||
}
|
}
|
||||||
@ -1468,7 +1484,13 @@ export class DockviewComponent
|
|||||||
location,
|
location,
|
||||||
target
|
target
|
||||||
);
|
);
|
||||||
const group = this.createGroupAtLocation(relativeLocation);
|
const group = this.createGroupAtLocation(
|
||||||
|
relativeLocation,
|
||||||
|
this.orientationAtLocation(relativeLocation) ===
|
||||||
|
Orientation.VERTICAL
|
||||||
|
? initial?.height
|
||||||
|
: initial?.width
|
||||||
|
);
|
||||||
panel = this.createPanel(options, group);
|
panel = this.createPanel(options, group);
|
||||||
group.model.openPanel(panel, {
|
group.model.openPanel(panel, {
|
||||||
skipSetActive: options.inactive,
|
skipSetActive: options.inactive,
|
||||||
@ -1502,7 +1524,12 @@ export class DockviewComponent
|
|||||||
skipSetGroupActive: options.inactive,
|
skipSetGroupActive: options.inactive,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const group = this.createGroupAtLocation();
|
const group = this.createGroupAtLocation(
|
||||||
|
[0],
|
||||||
|
this.gridview.orientation === Orientation.VERTICAL
|
||||||
|
? initial?.height
|
||||||
|
: initial?.width
|
||||||
|
);
|
||||||
panel = this.createPanel(options, group);
|
panel = this.createPanel(options, group);
|
||||||
group.model.openPanel(panel, {
|
group.model.openPanel(panel, {
|
||||||
skipSetActive: options.inactive,
|
skipSetActive: options.inactive,
|
||||||
@ -1640,7 +1667,12 @@ export class DockviewComponent
|
|||||||
);
|
);
|
||||||
|
|
||||||
const group = this.createGroup(options);
|
const group = this.createGroup(options);
|
||||||
this.doAddGroup(group, relativeLocation);
|
const size =
|
||||||
|
this.getLocationOrientation(relativeLocation) ===
|
||||||
|
Orientation.VERTICAL
|
||||||
|
? options.initialHeight
|
||||||
|
: options.initialWidth;
|
||||||
|
this.doAddGroup(group, relativeLocation, size);
|
||||||
if (!options.skipSetActive) {
|
if (!options.skipSetActive) {
|
||||||
this.doSetGroupAndPanelActive(group);
|
this.doSetGroupAndPanelActive(group);
|
||||||
}
|
}
|
||||||
@ -1654,6 +1686,13 @@ export class DockviewComponent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private getLocationOrientation(location: number[]) {
|
||||||
|
return location.length % 2 == 0 &&
|
||||||
|
this.gridview.orientation === Orientation.HORIZONTAL
|
||||||
|
? Orientation.HORIZONTAL
|
||||||
|
: Orientation.VERTICAL;
|
||||||
|
}
|
||||||
|
|
||||||
removeGroup(
|
removeGroup(
|
||||||
group: DockviewGroupPanel,
|
group: DockviewGroupPanel,
|
||||||
options?:
|
options?:
|
||||||
@ -2259,7 +2298,13 @@ export class DockviewComponent
|
|||||||
this._api,
|
this._api,
|
||||||
group,
|
group,
|
||||||
view,
|
view,
|
||||||
{ renderer: options.renderer }
|
{
|
||||||
|
renderer: options.renderer,
|
||||||
|
minimumWidth: options.minimumWidth,
|
||||||
|
minimumHeight: options.minimumHeight,
|
||||||
|
maximumWidth: options.maximumWidth,
|
||||||
|
maximumHeight: options.maximumHeight,
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
panel.init({
|
panel.init({
|
||||||
@ -2271,10 +2316,11 @@ export class DockviewComponent
|
|||||||
}
|
}
|
||||||
|
|
||||||
private createGroupAtLocation(
|
private createGroupAtLocation(
|
||||||
location: number[] = [0]
|
location: number[],
|
||||||
|
size?: number
|
||||||
): DockviewGroupPanel {
|
): DockviewGroupPanel {
|
||||||
const group = this.createGroup();
|
const group = this.createGroup();
|
||||||
this.doAddGroup(group, location);
|
this.doAddGroup(group, location, size);
|
||||||
return group;
|
return group;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2283,4 +2329,11 @@ export class DockviewComponent
|
|||||||
group.value.model.containsPanel(panel)
|
group.value.model.containsPanel(panel)
|
||||||
)?.value;
|
)?.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private orientationAtLocation(location: number[]) {
|
||||||
|
const rootOrientation = this.gridview.orientation;
|
||||||
|
return location.length % 2 == 1
|
||||||
|
? rootOrientation
|
||||||
|
: orthogonal(rootOrientation);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,34 @@ export class DockviewGroupPanel
|
|||||||
{
|
{
|
||||||
private readonly _model: DockviewGroupPanelModel;
|
private readonly _model: DockviewGroupPanelModel;
|
||||||
|
|
||||||
|
get minimumWidth(): number {
|
||||||
|
const activePanelMinimumWidth = this.activePanel?.minimumWidth;
|
||||||
|
return typeof activePanelMinimumWidth === 'number'
|
||||||
|
? activePanelMinimumWidth
|
||||||
|
: MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH;
|
||||||
|
}
|
||||||
|
|
||||||
|
get minimumHeight(): number {
|
||||||
|
const activePanelMinimumHeight = this.activePanel?.minimumHeight;
|
||||||
|
return typeof activePanelMinimumHeight === 'number'
|
||||||
|
? activePanelMinimumHeight
|
||||||
|
: MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT;
|
||||||
|
}
|
||||||
|
|
||||||
|
get maximumWidth(): number {
|
||||||
|
const activePanelMaximumWidth = this.activePanel?.maximumWidth;
|
||||||
|
return typeof activePanelMaximumWidth === 'number'
|
||||||
|
? activePanelMaximumWidth
|
||||||
|
: Number.MAX_SAFE_INTEGER;
|
||||||
|
}
|
||||||
|
|
||||||
|
get maximumHeight(): number {
|
||||||
|
const activePanelMaximumHeight = this.activePanel?.maximumHeight;
|
||||||
|
return typeof activePanelMaximumHeight === 'number'
|
||||||
|
? activePanelMaximumHeight
|
||||||
|
: Number.MAX_SAFE_INTEGER;
|
||||||
|
}
|
||||||
|
|
||||||
get panels(): IDockviewPanel[] {
|
get panels(): IDockviewPanel[] {
|
||||||
return this._model.panels;
|
return this._model.panels;
|
||||||
}
|
}
|
||||||
@ -71,8 +99,14 @@ export class DockviewGroupPanel
|
|||||||
id,
|
id,
|
||||||
'groupview_default',
|
'groupview_default',
|
||||||
{
|
{
|
||||||
minimumHeight: MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT,
|
minimumHeight:
|
||||||
minimumWidth: MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
|
options.constraints?.minimumHeight ??
|
||||||
|
MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT,
|
||||||
|
minimumWidth:
|
||||||
|
options.constraints?.maximumHeight ??
|
||||||
|
MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
|
||||||
|
maximumHeight: options.constraints?.maximumHeight,
|
||||||
|
maximumWidth: options.constraints?.maximumWidth,
|
||||||
},
|
},
|
||||||
new DockviewGroupPanelApiImpl(id, accessor)
|
new DockviewGroupPanelApiImpl(id, accessor)
|
||||||
);
|
);
|
||||||
|
@ -38,6 +38,7 @@ import {
|
|||||||
} from './options';
|
} from './options';
|
||||||
import { OverlayRenderContainer } from '../overlay/overlayRenderContainer';
|
import { OverlayRenderContainer } from '../overlay/overlayRenderContainer';
|
||||||
import { TitleEvent } from '../api/dockviewPanelApi';
|
import { TitleEvent } from '../api/dockviewPanelApi';
|
||||||
|
import { Contraints } from '../gridview/gridviewPanel';
|
||||||
|
|
||||||
interface GroupMoveEvent {
|
interface GroupMoveEvent {
|
||||||
groupId: string;
|
groupId: string;
|
||||||
@ -50,6 +51,9 @@ interface CoreGroupOptions {
|
|||||||
locked?: DockviewGroupPanelLocked;
|
locked?: DockviewGroupPanelLocked;
|
||||||
hideHeader?: boolean;
|
hideHeader?: boolean;
|
||||||
skipSetActive?: boolean;
|
skipSetActive?: boolean;
|
||||||
|
constraints?: Partial<Contraints>;
|
||||||
|
initialWidth?: number;
|
||||||
|
initialHeight?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GroupOptions extends CoreGroupOptions {
|
export interface GroupOptions extends CoreGroupOptions {
|
||||||
|
@ -11,6 +11,7 @@ import { IDockviewPanelModel } from './dockviewPanelModel';
|
|||||||
import { DockviewComponent } from './dockviewComponent';
|
import { DockviewComponent } from './dockviewComponent';
|
||||||
import { DockviewPanelRenderer } from '../overlay/overlayRenderContainer';
|
import { DockviewPanelRenderer } from '../overlay/overlayRenderContainer';
|
||||||
import { WillFocusEvent } from '../api/panelApi';
|
import { WillFocusEvent } from '../api/panelApi';
|
||||||
|
import { Contraints } from '../gridview/gridviewPanel';
|
||||||
|
|
||||||
export interface IDockviewPanel extends IDisposable, IPanel {
|
export interface IDockviewPanel extends IDisposable, IPanel {
|
||||||
readonly view: IDockviewPanelModel;
|
readonly view: IDockviewPanelModel;
|
||||||
@ -18,6 +19,10 @@ export interface IDockviewPanel extends IDisposable, IPanel {
|
|||||||
readonly api: DockviewPanelApi;
|
readonly api: DockviewPanelApi;
|
||||||
readonly title: string | undefined;
|
readonly title: string | undefined;
|
||||||
readonly params: Parameters | undefined;
|
readonly params: Parameters | undefined;
|
||||||
|
readonly minimumWidth?: number;
|
||||||
|
readonly minimumHeight?: number;
|
||||||
|
readonly maximumWidth?: number;
|
||||||
|
readonly maximumHeight?: number;
|
||||||
updateParentGroup(
|
updateParentGroup(
|
||||||
group: DockviewGroupPanel,
|
group: DockviewGroupPanel,
|
||||||
options?: { skipSetActive?: boolean }
|
options?: { skipSetActive?: boolean }
|
||||||
@ -40,6 +45,11 @@ export class DockviewPanel
|
|||||||
private _title: string | undefined;
|
private _title: string | undefined;
|
||||||
private _renderer: DockviewPanelRenderer | undefined;
|
private _renderer: DockviewPanelRenderer | undefined;
|
||||||
|
|
||||||
|
private _minimumWidth: number | undefined;
|
||||||
|
private _minimumHeight: number | undefined;
|
||||||
|
private _maximumWidth: number | undefined;
|
||||||
|
private _maximumHeight: number | undefined;
|
||||||
|
|
||||||
get params(): Parameters | undefined {
|
get params(): Parameters | undefined {
|
||||||
return this._params;
|
return this._params;
|
||||||
}
|
}
|
||||||
@ -56,6 +66,22 @@ export class DockviewPanel
|
|||||||
return this._renderer ?? this.accessor.renderer;
|
return this._renderer ?? this.accessor.renderer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get minimumWidth(): number | undefined {
|
||||||
|
return this._minimumWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
get minimumHeight(): number | undefined {
|
||||||
|
return this._minimumHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
get maximumWidth(): number | undefined {
|
||||||
|
return this._maximumWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
get maximumHeight(): number | undefined {
|
||||||
|
return this._maximumHeight;
|
||||||
|
}
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public readonly id: string,
|
public readonly id: string,
|
||||||
component: string,
|
component: string,
|
||||||
@ -64,11 +90,15 @@ export class DockviewPanel
|
|||||||
private readonly containerApi: DockviewApi,
|
private readonly containerApi: DockviewApi,
|
||||||
group: DockviewGroupPanel,
|
group: DockviewGroupPanel,
|
||||||
readonly view: IDockviewPanelModel,
|
readonly view: IDockviewPanelModel,
|
||||||
options: { renderer?: DockviewPanelRenderer }
|
options: { renderer?: DockviewPanelRenderer } & Partial<Contraints>
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
this._renderer = options.renderer;
|
this._renderer = options.renderer;
|
||||||
this._group = group;
|
this._group = group;
|
||||||
|
this._minimumWidth = options.minimumWidth;
|
||||||
|
this._minimumHeight = options.minimumHeight;
|
||||||
|
this._maximumWidth = options.maximumWidth;
|
||||||
|
this._maximumHeight = options.maximumHeight;
|
||||||
|
|
||||||
this.api = new DockviewPanelApiImpl(
|
this.api = new DockviewPanelApiImpl(
|
||||||
this,
|
this,
|
||||||
@ -129,6 +159,10 @@ export class DockviewPanel
|
|||||||
: undefined,
|
: undefined,
|
||||||
title: this.title,
|
title: this.title,
|
||||||
renderer: this._renderer,
|
renderer: this._renderer,
|
||||||
|
minimumHeight: this._minimumHeight,
|
||||||
|
maximumHeight: this._maximumHeight,
|
||||||
|
minimumWidth: this._minimumWidth,
|
||||||
|
maximumWidth: this._maximumWidth,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ import { DockviewPanelRenderer } from '../overlay/overlayRenderContainer';
|
|||||||
import { IGroupHeaderProps } from './framework';
|
import { IGroupHeaderProps } from './framework';
|
||||||
import { AnchoredBox } from '../types';
|
import { AnchoredBox } from '../types';
|
||||||
import { FloatingGroupOptions } from './dockviewComponent';
|
import { FloatingGroupOptions } from './dockviewComponent';
|
||||||
|
import { Contraints } from '../gridview/gridviewPanel';
|
||||||
|
|
||||||
export interface IHeaderActionsRenderer extends IDisposable {
|
export interface IHeaderActionsRenderer extends IDisposable {
|
||||||
readonly element: HTMLElement;
|
readonly element: HTMLElement;
|
||||||
@ -116,6 +117,17 @@ export const PROPERTY_KEYS: (keyof DockviewOptions)[] = (() => {
|
|||||||
return Object.keys(properties) as (keyof DockviewOptions)[];
|
return Object.keys(properties) as (keyof DockviewOptions)[];
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
export interface CreateComponentOptions {
|
||||||
|
/**
|
||||||
|
* The unqiue identifer of the component
|
||||||
|
*/
|
||||||
|
id: string;
|
||||||
|
/**
|
||||||
|
* The component name, this should determine what is rendered.
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface DockviewFrameworkOptions {
|
export interface DockviewFrameworkOptions {
|
||||||
defaultTabComponent?: string;
|
defaultTabComponent?: string;
|
||||||
createRightHeaderActionComponent?: (
|
createRightHeaderActionComponent?: (
|
||||||
@ -127,14 +139,10 @@ export interface DockviewFrameworkOptions {
|
|||||||
createPrefixHeaderActionComponent?: (
|
createPrefixHeaderActionComponent?: (
|
||||||
group: DockviewGroupPanel
|
group: DockviewGroupPanel
|
||||||
) => IHeaderActionsRenderer;
|
) => IHeaderActionsRenderer;
|
||||||
createTabComponent?: (options: {
|
createTabComponent?: (
|
||||||
id: string;
|
options: CreateComponentOptions
|
||||||
name: string;
|
) => ITabRenderer | undefined;
|
||||||
}) => ITabRenderer | undefined;
|
createComponent: (options: CreateComponentOptions) => IContentRenderer;
|
||||||
createComponent: (options: {
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
}) => IContentRenderer;
|
|
||||||
createWatermarkComponent?: () => IWatermarkRenderer;
|
createWatermarkComponent?: () => IWatermarkRenderer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,7 +238,10 @@ export type AddPanelOptions<P extends object = Parameters> = {
|
|||||||
* Defaults to `false` which forces newly added panels to become active.
|
* Defaults to `false` which forces newly added panels to become active.
|
||||||
*/
|
*/
|
||||||
inactive?: boolean;
|
inactive?: boolean;
|
||||||
} & Partial<AddPanelOptionsUnion>;
|
initialWidth?: number;
|
||||||
|
initialHeight?: number;
|
||||||
|
} & Partial<AddPanelOptionsUnion> &
|
||||||
|
Partial<Contraints>;
|
||||||
|
|
||||||
type AddGroupOptionsWithPanel = {
|
type AddGroupOptionsWithPanel = {
|
||||||
referencePanel: string | IDockviewPanel;
|
referencePanel: string | IDockviewPanel;
|
||||||
|
@ -63,4 +63,8 @@ export interface GroupviewPanelState {
|
|||||||
title?: string;
|
title?: string;
|
||||||
renderer?: DockviewPanelRenderer;
|
renderer?: DockviewPanelRenderer;
|
||||||
params?: { [key: string]: any };
|
params?: { [key: string]: any };
|
||||||
|
minimumWidth?: number;
|
||||||
|
minimumHeight?: number;
|
||||||
|
maximumWidth?: number;
|
||||||
|
maximumHeight?: number;
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,13 @@ import { Emitter, Event } from '../events';
|
|||||||
import { IViewSize } from './gridview';
|
import { IViewSize } from './gridview';
|
||||||
import { BaseGrid, IGridPanelView } from './baseComponentGridview';
|
import { BaseGrid, IGridPanelView } from './baseComponentGridview';
|
||||||
|
|
||||||
|
export interface Contraints {
|
||||||
|
minimumWidth?: number;
|
||||||
|
maximumWidth?: number;
|
||||||
|
minimumHeight?: number;
|
||||||
|
maximumHeight?: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface GridviewInitParameters extends PanelInitParameters {
|
export interface GridviewInitParameters extends PanelInitParameters {
|
||||||
minimumWidth?: number;
|
minimumWidth?: number;
|
||||||
maximumWidth?: number;
|
maximumWidth?: number;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user