Merge pull request from LLK/revert-452-feature/fencing

Revert "Feature fencing"
This commit is contained in:
Ray Schamp 2017-02-15 09:44:34 -05:00 committed by GitHub
commit b4c98d30c6

View file

@ -167,20 +167,15 @@ RenderedTarget.prototype.setXY = function (x, y) {
}
var oldX = this.x;
var oldY = this.y;
this.x = x;
this.y = y;
if (this.renderer) {
var position = this.renderer.getFencedPositionOfDrawable(this.drawableID, [x, y]);
this.x = position.x;
this.y = position.y;
this.renderer.updateDrawableProperties(this.drawableID, {
position: position
position: [this.x, this.y]
});
if (this.visible) {
this.runtime.requestRedraw();
}
} else {
this.x = x;
this.y = y;
}
this.emit(RenderedTarget.EVENT_TARGET_MOVED, this, oldX, oldY);
this.runtime.spriteInfoReport(this);