MCPcopy
hub / github.com/alibaba/lowcode-engine / selectAll

Method selectAll

packages/designer/src/document/selection.ts:48–62  ·  view source on GitHub ↗

* 批量选中

(ids: string[])

Source from the content-addressed store, hash-verified

46 * 批量选中
47 */
48 selectAll(ids: string[]) {
49 const selectIds: string[] = [];
50
51 ids.forEach(d => {
52 const node = this.doc.getNode(d);
53
54 if (node?.canSelect()) {
55 selectIds.push(d);
56 }
57 });
58
59 this._selected = selectIds;
60
61 this.emitter.emit('selectionchange', this._selected);
62 }
63
64 /**
65 * 清除选中

Callers

nothing calls this directly

Calls 5

pushMethod · 0.80
forEachMethod · 0.65
getNodeMethod · 0.65
canSelectMethod · 0.65
emitMethod · 0.65

Tested by

no test coverage detected