mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-14 19:49:57 -05:00
Revert "Feature fencing"
This commit is contained in:
parent
74f7c4f5b1
commit
39158c9d48
1 changed files with 3 additions and 8 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue