diff --git a/src/gameobjects/domelement/DOMElementCSSRenderer.js b/src/gameobjects/domelement/DOMElementCSSRenderer.js index a88bbe445..f04a54bbc 100644 --- a/src/gameobjects/domelement/DOMElementCSSRenderer.js +++ b/src/gameobjects/domelement/DOMElementCSSRenderer.js @@ -85,7 +85,7 @@ var DOMElementCSSRenderer = function (renderer, src, camera, parentMatrix) dx = (src.width) * src.originX; dy = (src.height) * src.originY; - srcMatrix.applyITRS(src.x - dx, src.y - dy, src.rotation, src.scaleX, src.scaleY); + srcMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -97,6 +97,9 @@ var DOMElementCSSRenderer = function (renderer, src, camera, parentMatrix) // Multiply by the src matrix, store result in calcMatrix camMatrix.multiply(srcMatrix, calcMatrix); + + calcMatrix.e -= dx; + calcMatrix.f -= dy; } if (!src.transformOnly)