Takes any transforms into account to get the correct parent bounds

This commit is contained in:
Juan David Nicholls Cardona 2015-09-25 15:42:29 -05:00
parent db641ca82e
commit 8ce70cbeb4

View file

@ -1415,8 +1415,9 @@ Phaser.ScaleManager.prototype = {
{
// Ref. http://msdn.microsoft.com/en-us/library/hh781509(v=vs.85).aspx for getBoundingClientRect
var clientRect = parentNode.getBoundingClientRect();
var parentRect = parentNode.offsetParent.getBoundingClientRect();
bounds.setTo(clientRect.left, clientRect.top, clientRect.width, clientRect.height);
bounds.setTo(clientRect.left - parentRect.left, clientRect.top - parentRect.top, clientRect.width, clientRect.height);
var wc = this.windowConstraints;