Fix tiles not collapsing toward their center
This commit is contained in:
parent
391ba5196c
commit
4e5a75074a
2 changed files with 5 additions and 5 deletions
|
@ -543,8 +543,8 @@ export function cycleTileSize(tileId: string, g: Grid): Grid {
|
||||||
// To make the tile appear to expand outwards from its center, we're actually
|
// To make the tile appear to expand outwards from its center, we're actually
|
||||||
// scanning for locations to put the *center* of the tile. These numbers are
|
// scanning for locations to put the *center* of the tile. These numbers are
|
||||||
// the offsets between the tile's origin and its center.
|
// the offsets between the tile's origin and its center.
|
||||||
const scanColumnOffset = Math.floor((toWidth - 1) / 2);
|
const scanColumnOffset = Math.floor((toWidth - fromWidth) / 2);
|
||||||
const scanRowOffset = Math.floor((toHeight - 1) / 2);
|
const scanRowOffset = Math.floor((toHeight - fromHeight) / 2);
|
||||||
|
|
||||||
const nextScanLocations = new Set<number>([from]);
|
const nextScanLocations = new Set<number>([from]);
|
||||||
const rows = row(g.cells.length - 1, g) + 1;
|
const rows = row(g.cells.length - 1, g) + 1;
|
||||||
|
|
|
@ -273,9 +273,9 @@ dbbe
|
||||||
fghi
|
fghi
|
||||||
jk`,
|
jk`,
|
||||||
`
|
`
|
||||||
abhc
|
akbc
|
||||||
djge
|
djhe
|
||||||
fik`
|
fig`
|
||||||
);
|
);
|
||||||
|
|
||||||
testCycleTileSize(
|
testCycleTileSize(
|
||||||
|
|
Loading…
Reference in a new issue