Skip to content

Commit 3af3b97

Browse files
committed
update format of docs
1 parent 114c151 commit 3af3b97

File tree

9 files changed

+116
-115
lines changed

9 files changed

+116
-115
lines changed

es/DockData.d.ts

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,67 +2,67 @@ import React from 'react';
22
import { Filter } from "./Algorithm";
33
export interface TabGroup {
44
/**
5-
* whether tab can be dragged into float layer
6-
* If value is "singleTab", float panel can't have multiple tabs
5+
* Whether tab can be dragged into float layer.
6+
* If value is "singleTab", float panel can't have multiple tabs.
77
*
88
* default: false
99
*/
1010
floatable?: boolean | 'singleTab';
1111
/**
12-
* whether tab can be converted to native window, only works when floatable is true
12+
* Whether tab can be converted to native window, only works when floatable is true.
1313
*
1414
* default: false
1515
*/
1616
newWindow?: boolean;
1717
/**
18-
* disable dock, so the panel will only work in float mode
18+
* Disable dock, so the panel will only work in float mode.
1919
*
2020
* default: false
2121
*/
2222
disableDock?: boolean;
2323
/**
24-
* whether tab can be maximized
24+
* Whether tab can be maximized
2525
*
2626
* default: false
2727
*/
2828
maximizable?: boolean;
2929
/**
30-
* when tabs are locked, you can not drag tab to create new panel, but it can still be dropped into a different panel if they have the same tab group.
30+
* When tabs are locked, you can not drag tab to create new panel, but it can still be dropped into a different panel if they have the same tab group.
3131
*
3232
* default false
3333
*/
3434
tabLocked?: boolean;
3535
/**
36-
* whether to show animation effect when switch tabs
36+
* Whether to show animation effect when switch tabs.
3737
*
3838
* default true
3939
*/
4040
animated?: boolean;
4141
/**
42-
* generate extra content show in the right side of tab bar
42+
* Generate extra content show in the right side of tab bar.
4343
*
4444
* panelExtra can also be used as a listener on panel state changes,
45-
* if you don't need to show extra content in this case, just return null
45+
* If you don't need to show extra content in this case, just return null.
4646
*/
4747
panelExtra?: (panel: PanelData, context: DockContext) => React.ReactElement;
4848
/**
49-
* when creating float panel from dragging, DockLayout would use the original panel's size
50-
* use this to defined the [min, max] allowed with for the default size of a float panel
51-
* if not specified, minWidth = 100, maxWidth = 600
49+
* When creating float panel from dragging, DockLayout would use the original panel's size.
50+
* Use this to defined the [min, max] allowed with for the default size of a float panel.
51+
* If not specified, minWidth = 100, maxWidth = 600
5252
*/
5353
preferredFloatWidth?: [number, number];
5454
/**
55-
* when creating float panel from dragging, DockLayout would use the original panel's size
56-
* use this to defined the [min, max] allowed height for the default size of a float panel
57-
* if not specified, minHeight = 50, maxHeight = 500
55+
* When creating float panel from dragging, DockLayout would use the original panel's size.
56+
* Use this to defined the [min, max] allowed height for the default size of a float panel.
57+
* If not specified, minHeight = 50, maxHeight = 500
5858
*/
5959
preferredFloatHeight?: [number, number];
6060
/**
61-
* override the default flex grow and flex shrink for panel width
61+
* Override the default flex grow and flex shrink for panel width
6262
*/
6363
widthFlex?: number;
6464
/**
65-
* override the default flex grow and flex shrink for panel height
65+
* Override the default flex grow and flex shrink for panel height
6666
*/
6767
heightFlex?: number;
6868
}
@@ -92,13 +92,13 @@ export interface PanelBase {
9292
*/
9393
id?: string;
9494
/**
95-
* the size in dock box
95+
* The size in dock box,
9696
* width when in horizontal layout and height when in vertical layout
9797
*/
9898
size?: number;
9999
tabs: TabBase[];
100100
/**
101-
* the id of current tab
101+
* The id of current tab
102102
*/
103103
activeId?: string;
104104
/** float mode only */
@@ -119,7 +119,7 @@ export interface BoxBase {
119119
id?: string;
120120
mode: DockMode;
121121
/**
122-
* the size in dock box
122+
* The size in dock box,
123123
* width when in horizontal layout and height when in vertical layout
124124
*/
125125
size?: number;
@@ -175,7 +175,7 @@ interface PanelLock {
175175
minWidth?: number;
176176
minHeight?: number;
177177
/**
178-
* override the default extra content from TabGroup.panelExtra
178+
* override the default extra content from TabGroup.panelExtra,
179179
*
180180
* panelExtra can also be used as a listener on panel state changes,
181181
* if you don't need to show extra content in this case, just return null
@@ -201,8 +201,8 @@ export interface PanelData extends PanelBase, BoxChild {
201201
*/
202202
group?: string;
203203
/**
204-
* addition information of a panel
205-
* this prevents the panel from being removed when there is no tab inside
204+
* addition information of a panel,
205+
* This prevents the panel from being removed when there is no tab inside
206206
* a locked panel can not be moved to float layer either
207207
*/
208208
panelLock?: PanelLock;
@@ -219,17 +219,17 @@ export interface LayoutData extends LayoutBase {
219219
*/
220220
dockbox: BoxData;
221221
/**
222-
* float box
223-
* children must be PanelData, child box is not allowed
222+
* float box,
223+
* Children must be PanelData, child box is not allowed
224224
*/
225225
floatbox?: BoxData;
226226
/**
227-
* window box
228-
* children must be PanelData, child box is not allowed
227+
* window box,
228+
* Children must be PanelData, child box is not allowed
229229
*/
230230
windowbox?: BoxData;
231231
/**
232-
* the maximized panel
232+
* The maximized panel,
233233
* only one child allowed, child must be PanelData
234234
*/
235235
maxbox?: BoxData;
@@ -255,13 +255,13 @@ export interface DockContext {
255255
height: number;
256256
};
257257
/** @ignore
258-
* when a state change happen to the layout that's handled locally, like inside DockPanel or DockBox
259-
* it still need to tell the context there is a change so DockLayout can call onLayoutChange callback
260-
* this usually happens on dragEnd event of size/location change
258+
* When a state change happen to the layout that's handled locally, like inside DockPanel or DockBox.
259+
* It still need to tell the context there is a change so DockLayout can call onLayoutChange callback.
260+
* This usually happens on dragEnd event of size/location change.
261261
*/
262262
onSilentChange(currentTabId?: string, direction?: DropDirection): void;
263263
/**
264-
* move a tab or a panel, if source or target is already in the layout, you can use the find method to get it with id first
264+
* Move a tab or a panel, if source or target is already in the layout, you can use the find method to get it with id first
265265
* @param source the source TabData or PanelData being moved
266266
* - it can exist in the layout already
267267
* - or can be a new tab or new panel that you want to add to the layout
@@ -274,23 +274,23 @@ export interface DockContext {
274274
*/
275275
dockMove(source: TabData | PanelData, target: string | TabData | PanelData | BoxData | null, direction: DropDirection): void;
276276
/**
277-
* get the TabGroup defined in defaultLayout
277+
* Get the TabGroup defined in defaultLayout
278278
*/
279279
getGroup(name: string): TabGroup;
280280
/**
281-
* find PanelData or TabData by id
281+
* Find PanelData or TabData by id
282282
*/
283283
find(id: string, filter?: Filter): PanelData | TabData | BoxData;
284284
/**
285-
* update a tab with new TabData
285+
* Update a tab with new TabData
286286
* @param id tab id to update
287287
* @param newTab new tab data, if newTab is null, it only changes the active tab of parent panel
288288
* @param makeActive whether to make the tab the active child of parent panel
289289
* @returns returns false if the tab is not found
290290
*/
291291
updateTab(id: string, newTab: TabData, makeActive: boolean): boolean;
292292
/**
293-
* move focus to a dockpanel near by
293+
* Move focus to a dockpanel near by
294294
* @param fromElement
295295
* @param direction
296296
*/

lib/DockData.d.ts

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,67 +2,67 @@ import React from 'react';
22
import { Filter } from "./Algorithm";
33
export interface TabGroup {
44
/**
5-
* whether tab can be dragged into float layer
6-
* If value is "singleTab", float panel can't have multiple tabs
5+
* Whether tab can be dragged into float layer.
6+
* If value is "singleTab", float panel can't have multiple tabs.
77
*
88
* default: false
99
*/
1010
floatable?: boolean | 'singleTab';
1111
/**
12-
* whether tab can be converted to native window, only works when floatable is true
12+
* Whether tab can be converted to native window, only works when floatable is true.
1313
*
1414
* default: false
1515
*/
1616
newWindow?: boolean;
1717
/**
18-
* disable dock, so the panel will only work in float mode
18+
* Disable dock, so the panel will only work in float mode.
1919
*
2020
* default: false
2121
*/
2222
disableDock?: boolean;
2323
/**
24-
* whether tab can be maximized
24+
* Whether tab can be maximized
2525
*
2626
* default: false
2727
*/
2828
maximizable?: boolean;
2929
/**
30-
* when tabs are locked, you can not drag tab to create new panel, but it can still be dropped into a different panel if they have the same tab group.
30+
* When tabs are locked, you can not drag tab to create new panel, but it can still be dropped into a different panel if they have the same tab group.
3131
*
3232
* default false
3333
*/
3434
tabLocked?: boolean;
3535
/**
36-
* whether to show animation effect when switch tabs
36+
* Whether to show animation effect when switch tabs.
3737
*
3838
* default true
3939
*/
4040
animated?: boolean;
4141
/**
42-
* generate extra content show in the right side of tab bar
42+
* Generate extra content show in the right side of tab bar.
4343
*
4444
* panelExtra can also be used as a listener on panel state changes,
45-
* if you don't need to show extra content in this case, just return null
45+
* If you don't need to show extra content in this case, just return null.
4646
*/
4747
panelExtra?: (panel: PanelData, context: DockContext) => React.ReactElement;
4848
/**
49-
* when creating float panel from dragging, DockLayout would use the original panel's size
50-
* use this to defined the [min, max] allowed with for the default size of a float panel
51-
* if not specified, minWidth = 100, maxWidth = 600
49+
* When creating float panel from dragging, DockLayout would use the original panel's size.
50+
* Use this to defined the [min, max] allowed with for the default size of a float panel.
51+
* If not specified, minWidth = 100, maxWidth = 600
5252
*/
5353
preferredFloatWidth?: [number, number];
5454
/**
55-
* when creating float panel from dragging, DockLayout would use the original panel's size
56-
* use this to defined the [min, max] allowed height for the default size of a float panel
57-
* if not specified, minHeight = 50, maxHeight = 500
55+
* When creating float panel from dragging, DockLayout would use the original panel's size.
56+
* Use this to defined the [min, max] allowed height for the default size of a float panel.
57+
* If not specified, minHeight = 50, maxHeight = 500
5858
*/
5959
preferredFloatHeight?: [number, number];
6060
/**
61-
* override the default flex grow and flex shrink for panel width
61+
* Override the default flex grow and flex shrink for panel width
6262
*/
6363
widthFlex?: number;
6464
/**
65-
* override the default flex grow and flex shrink for panel height
65+
* Override the default flex grow and flex shrink for panel height
6666
*/
6767
heightFlex?: number;
6868
}
@@ -92,13 +92,13 @@ export interface PanelBase {
9292
*/
9393
id?: string;
9494
/**
95-
* the size in dock box
95+
* The size in dock box,
9696
* width when in horizontal layout and height when in vertical layout
9797
*/
9898
size?: number;
9999
tabs: TabBase[];
100100
/**
101-
* the id of current tab
101+
* The id of current tab
102102
*/
103103
activeId?: string;
104104
/** float mode only */
@@ -119,7 +119,7 @@ export interface BoxBase {
119119
id?: string;
120120
mode: DockMode;
121121
/**
122-
* the size in dock box
122+
* The size in dock box,
123123
* width when in horizontal layout and height when in vertical layout
124124
*/
125125
size?: number;
@@ -175,7 +175,7 @@ interface PanelLock {
175175
minWidth?: number;
176176
minHeight?: number;
177177
/**
178-
* override the default extra content from TabGroup.panelExtra
178+
* override the default extra content from TabGroup.panelExtra,
179179
*
180180
* panelExtra can also be used as a listener on panel state changes,
181181
* if you don't need to show extra content in this case, just return null
@@ -201,8 +201,8 @@ export interface PanelData extends PanelBase, BoxChild {
201201
*/
202202
group?: string;
203203
/**
204-
* addition information of a panel
205-
* this prevents the panel from being removed when there is no tab inside
204+
* addition information of a panel,
205+
* This prevents the panel from being removed when there is no tab inside
206206
* a locked panel can not be moved to float layer either
207207
*/
208208
panelLock?: PanelLock;
@@ -219,17 +219,17 @@ export interface LayoutData extends LayoutBase {
219219
*/
220220
dockbox: BoxData;
221221
/**
222-
* float box
223-
* children must be PanelData, child box is not allowed
222+
* float box,
223+
* Children must be PanelData, child box is not allowed
224224
*/
225225
floatbox?: BoxData;
226226
/**
227-
* window box
228-
* children must be PanelData, child box is not allowed
227+
* window box,
228+
* Children must be PanelData, child box is not allowed
229229
*/
230230
windowbox?: BoxData;
231231
/**
232-
* the maximized panel
232+
* The maximized panel,
233233
* only one child allowed, child must be PanelData
234234
*/
235235
maxbox?: BoxData;
@@ -255,13 +255,13 @@ export interface DockContext {
255255
height: number;
256256
};
257257
/** @ignore
258-
* when a state change happen to the layout that's handled locally, like inside DockPanel or DockBox
259-
* it still need to tell the context there is a change so DockLayout can call onLayoutChange callback
260-
* this usually happens on dragEnd event of size/location change
258+
* When a state change happen to the layout that's handled locally, like inside DockPanel or DockBox.
259+
* It still need to tell the context there is a change so DockLayout can call onLayoutChange callback.
260+
* This usually happens on dragEnd event of size/location change.
261261
*/
262262
onSilentChange(currentTabId?: string, direction?: DropDirection): void;
263263
/**
264-
* move a tab or a panel, if source or target is already in the layout, you can use the find method to get it with id first
264+
* Move a tab or a panel, if source or target is already in the layout, you can use the find method to get it with id first
265265
* @param source the source TabData or PanelData being moved
266266
* - it can exist in the layout already
267267
* - or can be a new tab or new panel that you want to add to the layout
@@ -274,23 +274,23 @@ export interface DockContext {
274274
*/
275275
dockMove(source: TabData | PanelData, target: string | TabData | PanelData | BoxData | null, direction: DropDirection): void;
276276
/**
277-
* get the TabGroup defined in defaultLayout
277+
* Get the TabGroup defined in defaultLayout
278278
*/
279279
getGroup(name: string): TabGroup;
280280
/**
281-
* find PanelData or TabData by id
281+
* Find PanelData or TabData by id
282282
*/
283283
find(id: string, filter?: Filter): PanelData | TabData | BoxData;
284284
/**
285-
* update a tab with new TabData
285+
* Update a tab with new TabData
286286
* @param id tab id to update
287287
* @param newTab new tab data, if newTab is null, it only changes the active tab of parent panel
288288
* @param makeActive whether to make the tab the active child of parent panel
289289
* @returns returns false if the tab is not found
290290
*/
291291
updateTab(id: string, newTab: TabData, makeActive: boolean): boolean;
292292
/**
293-
* move focus to a dockpanel near by
293+
* Move focus to a dockpanel near by
294294
* @param fromElement
295295
* @param direction
296296
*/

0 commit comments

Comments
 (0)