Home > DMT_EditorControl > removeIndicatorMarkers
DMT_EditorControl.removeIndicatorMarkers() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Remove indicator markers
Signature
typescript
function removeIndicatorMarkers(tabId?: string): Promise<boolean>;1
Parameters
Parameter | Type | Description |
|---|---|---|
tabId | string | (Optional) Tab ID. If not passed in, the canvas with the last input focus will be used |
Returns
Promise<boolean>
Whether the indicator markers were removed successfully, false indicates that the canvas does not support this operation or tabId does not exist
Remarks
This API will remove all generated indicator markers
Example
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