Skip to content

Commit 661b920

Browse files
committed
Fixed parent style assignment
1 parent 91b35af commit 661b920

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

src/dom/ScaleManager.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ var ScaleManager = new Class({
171171
var parentScaleX = parseInt(width, 10) / 100;
172172

173173
width = Math.floor(this.parentSize.width * parentScaleX);
174-
175-
console.log('100% w', parentScaleX, width, this.parentSize.toString());
176174
}
177175

178176
// If height = '100%', or similar value
@@ -264,16 +262,16 @@ var ScaleManager = new Class({
264262
this.parentIsWindow = false;
265263
}
266264

267-
var parentStyle = this.parent.style;
268-
269265
if (canExpandParent)
270266
{
271-
parentStyle.height = '100%';
272-
273267
if (this.parentIsWindow)
274268
{
275269
document.getElementsByTagName('html')[0].style.height = '100%';
276270
}
271+
else
272+
{
273+
this.parent.style.height = '100%';
274+
}
277275
}
278276
},
279277

@@ -467,6 +465,12 @@ var ScaleManager = new Class({
467465
{
468466
style.marginTop = offsetY + 'px';
469467
}
468+
469+
// Update the parentSize incase the canvas/style change modified it
470+
if (!this.parentIsWindow)
471+
{
472+
this.getParentBounds();
473+
}
470474
},
471475

472476
/**

0 commit comments

Comments
 (0)