Revert "Feature fencing"

This commit is contained in:
Ray Schamp 2017-02-15 09:40:10 -05:00 committed by GitHub
parent 74f7c4f5b1
commit 39158c9d48

View file

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