mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Takes any transforms into account to get the correct parent bounds
This commit is contained in:
parent
db641ca82e
commit
8ce70cbeb4
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue