MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / select

Method select

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

* 选中

(id: string)

Source from the content-addressed store, hash-verified

27 * 选中
28 */
29 select(id: string) {
30 if (this._selected.length === 1 && this._selected.indexOf(id) > -1) {
31 // avoid cause reaction
32 return;
33 }
34
35 const node = this.doc.getNode(id);
36
37 if (!node?.canSelect()) {
38 return;
39 }
40
41 this._selected = [id];
42 this.emitter.emit('selectionchange', this._selected);
43 }
44
45 /**
46 * 批量选中

Callers

nothing calls this directly

Calls 4

indexOfMethod · 0.65
getNodeMethod · 0.65
canSelectMethod · 0.65
emitMethod · 0.65

Tested by

no test coverage detected