mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-14 11:39:59 -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 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);
|
||||
|
|
Loading…
Reference in a new issue