Home > DMT_EditorControl > tileAllDocumentToSplitScreen
DMT_EditorControl.tileAllDocumentToSplitScreen() method
Tile all documents
Signature
typescript
function tileAllDocumentToSplitScreen(): Promise<boolean>;1
Returns
Promise<boolean>
Whether the operation is successful
Remarks
Only available when no child split screens exist. It will automatically create split screens for all opened document tabs
Example
javascript
// 1. 归一化布局:先合并既有子分屏,满足"无子分屏"前提
await eda.dmt_EditorControl.mergeAllDocumentFromSplitScreen();
// 2. 打开两个文档,给平铺提供素材
const pages = await eda.dmt_Schematic.getAllSchematicPagesInfo();
const pcbs = await eda.dmt_Pcb.getAllPcbsInfo();
await eda.dmt_EditorControl.openDocument(pages[0].uuid);
await eda.dmt_EditorControl.openDocument(pcbs[0].uuid);
// 3. 平铺:每个标签页各占一个分屏
const tiled = await eda.dmt_EditorControl.tileAllDocumentToSplitScreen();
console.log('tiled:', tiled);
// 4. 合并所有分屏,恢复单屏布局
const merged = await eda.dmt_EditorControl.mergeAllDocumentFromSplitScreen();
console.log('merged:', merged);1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16