Include the origin blockId of the top block being dragged.

This is required by the GUI in order to take a snapshot of the blocks for the backpack. Only the ID is needed, the rest can be done by the GUI.
This commit is contained in:
Paul Kaplan 2018-11-01 14:13:07 -04:00
parent 5593c9ab3e
commit 596d0c4f5f
3 changed files with 6 additions and 5 deletions
src/engine

View file

@ -1857,9 +1857,10 @@ class Runtime extends EventEmitter {
/**
* Emit event to indicate that the block drag has ended with the blocks outside the blocks workspace
* @param {Array.<object>} blocks The set of blocks dragged to the GUI
* @param {string} topBlockId The original id of the top block being dragged
*/
emitBlockEndDrag (blocks) {
this.emit(Runtime.BLOCK_DRAG_END, blocks);
emitBlockEndDrag (blocks, topBlockId) {
this.emit(Runtime.BLOCK_DRAG_END, blocks, topBlockId);
}
/**