From 464722f7bddaf1f9e188d1ef61d45aa43a048b49 Mon Sep 17 00:00:00 2001 From: griffpatch Date: Thu, 9 Feb 2017 10:02:45 +0000 Subject: [PATCH 1/4] Feature - Fencing of sprites This change requires that the pull request for scratch-render (Feature fencing #82) be taken first --- src/sprites/rendered-target.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sprites/rendered-target.js b/src/sprites/rendered-target.js index 9bbc20b23..52d5d6471 100644 --- a/src/sprites/rendered-target.js +++ b/src/sprites/rendered-target.js @@ -170,6 +170,7 @@ RenderedTarget.prototype.setXY = function (x, y) { this.x = x; this.y = y; if (this.renderer) { + this.renderer.getFencedPositionOfDrawable(this.drawableID, this); this.renderer.updateDrawableProperties(this.drawableID, { position: [this.x, this.y] }); From 4d63dcac3b4f2e12751f0a95aa36ea82d2ab0d10 Mon Sep 17 00:00:00 2001 From: griffpatch Date: Sat, 11 Feb 2017 14:30:18 +0000 Subject: [PATCH 2/4] Rename fencing method --- src/sprites/rendered-target.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sprites/rendered-target.js b/src/sprites/rendered-target.js index 52d5d6471..cac450e1b 100644 --- a/src/sprites/rendered-target.js +++ b/src/sprites/rendered-target.js @@ -170,7 +170,7 @@ RenderedTarget.prototype.setXY = function (x, y) { this.x = x; this.y = y; if (this.renderer) { - this.renderer.getFencedPositionOfDrawable(this.drawableID, this); + this.renderer.fencePositionOfDrawable(this.drawableID, this); this.renderer.updateDrawableProperties(this.drawableID, { position: [this.x, this.y] }); From 75e3f6002bc688cc4e82cc66b2fc1dc78c8b497a Mon Sep 17 00:00:00 2001 From: griffpatch Date: Tue, 14 Feb 2017 09:12:35 +0000 Subject: [PATCH 3/4] Fencing - Take 3 Dependant on scratch-render pull request. --- src/sprites/rendered-target.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/sprites/rendered-target.js b/src/sprites/rendered-target.js index cac450e1b..3e1e06e12 100644 --- a/src/sprites/rendered-target.js +++ b/src/sprites/rendered-target.js @@ -167,16 +167,20 @@ RenderedTarget.prototype.setXY = function (x, y) { } var oldX = this.x; var oldY = this.y; - this.x = x; - this.y = y; if (this.renderer) { - this.renderer.fencePositionOfDrawable(this.drawableID, this); + var position = this.renderer.getFencedPositionOfDrawable(this.drawableID, [x, y]); + this.x = position.x; + this.y = position.y; + this.renderer.updateDrawableProperties(this.drawableID, { - position: [this.x, this.y] + position: position }); 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); From fba054cc68760b6fd01a516dfc9ddbbc883639a6 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 14 Feb 2017 19:26:13 +0000 Subject: [PATCH 4/4] chore(package): update tap to version 10.1.1 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c04928eec..49d4c8043 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "scratch-render": "latest", "script-loader": "0.7.0", "stats.js": "0.17.0", - "tap": "10.1.0", + "tap": "10.1.1", "travis-after-all": "1.4.4", "webpack": "2.2.1", "webpack-dev-server": "2.3.0"