mirror of
https://github.com/esjeon/krohnkite.git
synced 2024-10-04 07:18:09 +03:00
parent
58d7b4f1a5
commit
c8aea2d24f
@ -25,13 +25,13 @@ function stackTiles(tiles: Window[], x: number, y: number, width: number, height
|
||||
}
|
||||
|
||||
const count = tiles.length;
|
||||
const tileHeight = Math.floor((height - (count - 1) * gap) / count);
|
||||
const tileHeight = (height + gap) / count - gap;
|
||||
tiles.forEach((window: Window, i: number) => {
|
||||
window.geometry = new Rect(
|
||||
x,
|
||||
y + (tileHeight + gap) * i,
|
||||
y + Math.floor(i * (tileHeight + gap)),
|
||||
width,
|
||||
tileHeight,
|
||||
Math.floor(tileHeight),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user