Browse Source

Add getDragBlock

canvas-spot
Artur Arseniev 3 years ago
parent
commit
bb93018088
  1. 9
      src/block_manager/index.ts

9
src/block_manager/index.ts

@ -315,6 +315,15 @@ export default class BlockManager extends ItemManagerModule<BlockManagerConfig,
return this.blocksView?.el;
}
/**
* Returns currently dragging block.
* Updated when the drag starts and cleared once it's done.
* @returns {[Block]|undefined}
*/
getDragBlock() {
return this._dragBlock;
}
/**
* Render blocks
* @param {Array} blocks Blocks to render, without the argument will render all global blocks

Loading…
Cancel
Save