* Call Block Manager method that swap Blocks * * @param {number} fromIndex - position of first Block * @param {number} toIndex - position of second Block * @deprecated — use 'move' instead
(fromIndex: number, toIndex: number)
| 135 | * @deprecated — use 'move' instead |
| 136 | */ |
| 137 | public swap(fromIndex: number, toIndex: number): void { |
| 138 | _.log( |
| 139 | '`blocks.swap()` method is deprecated and will be removed in the next major release. ' + |
| 140 | 'Use `block.move()` method instead', |
| 141 | 'info' |
| 142 | ); |
| 143 | |
| 144 | this.Editor.BlockManager.swap(fromIndex, toIndex); |
| 145 | } |
| 146 | |
| 147 | /** |
| 148 | * Move block from one index to another |