Issue with FB Instant Export (Fixed Height)

Issue with FB Instant Export (Fixed Height)
0.0 0

#1

With Fixed Height checked, for the canvas of my scene,
my Fb instant app, is not centred in the browser. In face it starts from the left corner.
Anyone knows how to fix this ?

FYI, my design res is 960 x 640, and the scene works fine in mobile devices.

@jare
Probably, the fix added in the CocosReader.cpp is not working for the Instant games build.
// make scene at the center of screen
// should not just node's position because it is a Scene, and it will cause issue that click position is not correct(it is a bug of cocos2d-x)
// and should not change camera's position

for (auto& child : node->getChildren())
    if (dynamic_cast<Camera*>(child) == nullptr)
        child->setPosition(child->getPosition() + _positionDiffDesignResolution);

This code might not be working when building for FB instant games.


#2

If anyone is facing the same issue, then if you see the example project demo-instant-games
Select the canvas in the scene and see it’s properties, both Fixed Height and Fixed Width are checked for the scene to come in the center.

However, I feed this is a bug, a scene should always be positioned center in the browser.
but, if I only select the fixed height policy, it starts from the left side of the scene.