mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 23:12:24 -05:00
Merge remote-tracking branch 'refs/remotes/LLK/develop' into develop
This commit is contained in:
commit
a2c43a80ab
2 changed files with 9 additions and 4 deletions
|
@ -42,7 +42,7 @@
|
||||||
"scratch-render": "latest",
|
"scratch-render": "latest",
|
||||||
"script-loader": "0.7.0",
|
"script-loader": "0.7.0",
|
||||||
"stats.js": "0.17.0",
|
"stats.js": "0.17.0",
|
||||||
"tap": "10.1.0",
|
"tap": "10.1.1",
|
||||||
"travis-after-all": "1.4.4",
|
"travis-after-all": "1.4.4",
|
||||||
"webpack": "2.2.1",
|
"webpack": "2.2.1",
|
||||||
"webpack-dev-server": "2.3.0"
|
"webpack-dev-server": "2.3.0"
|
||||||
|
|
|
@ -167,15 +167,20 @@ 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: [this.x, this.y]
|
position: position
|
||||||
});
|
});
|
||||||
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