M.setParentGroup = function(group) if masterGroup and masterGroup ~= group then for i = 1, masterGroup.numChildren, 1 do group:insert(masterGroup[1]) end masterGroup:removeSelf() masterGroup = group --masterGroup.xReference = display.viewableContentWidth \* 0.5 --masterGroup.yReference = display.viewableContentHeight \* 0.5 M.masterGroup = masterGroup else masterGroup = group end -- group:insert(masterGroup); end
There is a problem with improper positioning of map after calling M.setParentGroup in latest version of mte.
The problem is due to setting the reference point after adding the children from the prev mastergroup.
As the children already respect these reference points, changing it only offsets the children further.
two proposed fixes:
either comment out:
masterGroup.xReference = display.viewableContentWidth * 0.5
masterGroup.yReference = display.viewableContentHeight * 0.5
or replace function contents entirely with:
group:insert(masterGroup);