So when the new items count is larger than the original the following items Y don't get calculated correctly.
You can test with this code. Follow where "testB3" ends up:
// Given F, S, W, H or frame, stage, stageW, stageH
let array = [
[new Label("testA1"), new Label("testA2")],
[new Label("testB1"), new Label("testB2"), new Label("testB3")]
];
let testTile = new Tile({
obj:array[0],
unique:true, // as of ZIM Cat
cols:1, rows: 5,
spacingV: 6
}).center();
new Button(128,48,"change").tap(() => {
testTile.remake(array[1]);
S.update();
}).pos(0,0,CENTER,BOTTOM,S);
Thanks @pettis - it worked in ZOM 017 and then breaks in 018. We did a fair bit of work there I think to arrange for background and backdrop functionality so looks like something broke. Complicated... will try and take a look tomorrow.
Still looking into it... but you can fix it by setting the testTile.rows=array[1].length then calling the remake. Will see why it is not being automatically set in newer versions now...
Okay... we see what the issue is... in the latest remake it calculates new spacings but this is using the last cols and rows - we figure out the new rows and cols in the makeTile which comes later. So we need to move the new cols and rows code to earlier. Doing it now...