Wrong game view when switch to full screen

Hi, everyone.
I have problem with full screen mode on my html5 games.
When players switch to full screen mode the games seems to be stretched.
Look at this pictures :

When the game is’t in full screen mode:

when the game goes to full screen mode:

also I’m using the following code to switch to full screen mode
cc.screen.requestFullScreen();

how to solve this problem?
Thanks.

Any idea???

how do you position objects? Widgets?

Yes I’m using widgets in fixed height mode.
For more information I must say that if player switch to full screen mode before game be loaded render would be correct in this case if player go out from full screen, screen will be scaled down with black borders.

I assume align once is set to off?

1 Like

What do you mean by align?

Not the align, but the “Align Once” property of Widget component. If it is on (and that’s recommended, unless you intentionally want to check the position every frame), you have to manually call widget’s updateAlignment() function on screen size change.

1 Like

“Align Once” worked !!
Thanks

Glad you got it working :slight_smile: