|
123456789101112131415161718192021 |
- function memoryGap() {
- return memorySide() + memorySpace();
- }
- function memorySide() {
- return 50;
- }
- function memorySpace() {
- return 20;
- }
- function memoryItemPositions(c) {
- var pos = [];
- var ids = Array.from(Array(c.itemsCount).keys());
- ids.forEach(function (i) {
- var row = Math.floor(i / 4);
- var x = memoryGap() + (i - row * 4) * memoryGap();
- var y = memoryGap() + row * memoryGap();
- // @ts-ignore
- pos.push(memoryCreatePosition(x, y));
- });
- return pos;
- }
|