From c1964e2de805c90685c1aa0267dcc56fb70f387e Mon Sep 17 00:00:00 2001 From: liabru Date: Sat, 12 Jul 2014 18:10:05 +0100 Subject: [PATCH] fixed scaling on RenderPixi view bounds --- src/render/RenderPixi.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/render/RenderPixi.js b/src/render/RenderPixi.js index 125d0931..7e824ab1 100644 --- a/src/render/RenderPixi.js +++ b/src/render/RenderPixi.js @@ -121,6 +121,10 @@ var RenderPixi = {}; // reset background state render.currentBackground = null; + + // reset bounds transforms + container.scale.set(1, 1); + container.position.set(0, 0); }; /** @@ -214,7 +218,7 @@ var RenderPixi = {}; // transform the view container.scale.set(1 / boundsScaleX, 1 / boundsScaleY); - container.position.set(-render.bounds.min.x, -render.bounds.min.y); + container.position.set(-render.bounds.min.x * (1 / boundsScaleX), -render.bounds.min.y * (1 / boundsScaleY)) } else { constraints = allConstraints; }