diff --git a/playground/playground.js b/playground/playground.js index cd9f8dff0..75a9f518e 100644 --- a/playground/playground.js +++ b/playground/playground.js @@ -154,6 +154,7 @@ window.onload = function() { }); vm.on('SPRITE_INFO_REPORT', function(data) { + if (data.id !== selectedTarget.value) return; // Not the editingTarget document.getElementById('sinfo-x').value = data.x; document.getElementById('sinfo-y').value = data.y; document.getElementById('sinfo-direction').value = data.direction; diff --git a/src/engine/runtime.js b/src/engine/runtime.js index 912c2923c..0e772eb44 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -723,14 +723,14 @@ Runtime.prototype.visualReport = function (blockId, value) { }; /** - * Emit a sprite info report if the provided target is the editing target. + * Emit a sprite info report if the provided target is the original sprite * @param {!Target} target Target to report sprite info for. */ Runtime.prototype.spriteInfoReport = function (target) { - if (target !== this._editingTarget) { - return; - } + if (!target.isOriginal) return; + this.emit(Runtime.SPRITE_INFO_REPORT, { + id: target.id, x: target.x, y: target.y, direction: target.direction,