* Get grouped undo manager stack. * The difference between `getStack` is when you do multiple operations at a time, * like appending multiple components: * `editor.getWrapper().append(' C1 C2 ');` * `getStack` will return a collection length of 2. * `getStackGroup`
()
| 324 | * @private |
| 325 | */ |
| 326 | getStackGroup() { |
| 327 | const result: any = []; |
| 328 | const inserted: any = []; |
| 329 | |
| 330 | this.getStack().forEach((item: any) => { |
| 331 | const index = item.get('magicFusionIndex'); |
| 332 | if (inserted.indexOf(index) < 0) { |
| 333 | inserted.push(index); |
| 334 | result.push(item); |
| 335 | } |
| 336 | }); |
| 337 | |
| 338 | return result; |
| 339 | } |
| 340 | |
| 341 | /** |
| 342 | * Execute the provided callback temporarily stopping tracking changes |
no test coverage detected