From c58bda18399898ef2f8432a3fec31faf0325d26c Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Wed, 31 Aug 2016 11:34:29 -0400 Subject: [PATCH] Record coordinate changes in block representation --- src/engine/blocks.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/engine/blocks.js b/src/engine/blocks.js index 96fdf50bf..f57a4c882 100644 --- a/src/engine/blocks.js +++ b/src/engine/blocks.js @@ -212,6 +212,12 @@ Blocks.prototype.changeBlock = function (args) { * @param {!Object} e Blockly move event to be processed */ Blocks.prototype.moveBlock = function (e) { + // Move coordinate changes. + if (e.newCoordinate) { + this._blocks[e.id].x = e.newCoordinate.x; + this._blocks[e.id].y = e.newCoordinate.y; + } + // Remove from any old parent. if (e.oldParent !== undefined) { var oldParent = this._blocks[e.oldParent];