Home > DMT_EditorControl > removeIndicatorMarkers
DMT_EditorControl.removeIndicatorMarkers() method
此 API 当前处于 BETA 预览状态,希望得到开发者的反馈。它的任何功能都可能在接下来的开发进程中被修改,请不要将它用于任何正式环境。
移除指示标记
签名
typescript
function removeIndicatorMarkers(tabId?: string): Promise<boolean>;1
参数名
参数 | 类型 | 描述 |
|---|---|---|
tabId | string | (可选) 标签页 ID,如若未传入,则为最后输入焦点的画布 |
返回值
Promise<boolean>
指示标记移除是否成功,false 表示画布不支持该操作或 tabId 不存在
备注
本接口会移除所有已生成的指示标记
示例
javascript
// 1. 打开一个原理图页,并先生成一个指示标记作为清理对象
const pages = await eda.dmt_Schematic.getAllSchematicPagesInfo();
const tabId = await eda.dmt_EditorControl.openDocument(pages[0].uuid);
const generated = await eda.dmt_EditorControl.generateIndicatorMarkers(
[{ type: 'circle', x: 150, y: 150, r: 60 }],
{ r: 0, g: 128, b: 255, alpha: 1 },
2,
false,
tabId,
);
console.log('generated:', generated);
// 2. 移除该画布上全部指示标记
const removed = await eda.dmt_EditorControl.removeIndicatorMarkers(tabId);
console.log('removed:', removed);1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15