* Adds a generic block to the workflow.
(id: string, type: string, position?: Position, name?: string)
| 43 | * Adds a generic block to the workflow. |
| 44 | */ |
| 45 | addBlock(id: string, type: string, position?: Position, name?: string): this { |
| 46 | this.blocks[id] = createBlock({ |
| 47 | id, |
| 48 | type, |
| 49 | name: name ?? id, |
| 50 | position: position ?? { x: 0, y: 0 }, |
| 51 | }) |
| 52 | return this |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Adds a starter block (workflow entry point). |
no test coverage detected