feat: author first playable mystery
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
containedIds,
|
||||
folderIsOpen,
|
||||
moveBoardPoint,
|
||||
nextOpenBoardPosition,
|
||||
normalizeCase,
|
||||
panViewport,
|
||||
relationPosition,
|
||||
@@ -58,6 +59,16 @@ describe('board coordinate math', () => {
|
||||
expect(zoomFromWheel(1, 10_000)).toBe(MIN_BOARD_ZOOM)
|
||||
expect(zoomFromWheel(1, -10_000)).toBe(MAX_BOARD_ZOOM)
|
||||
})
|
||||
|
||||
it('places new exhibits in deterministic open slots', () => {
|
||||
const preferred = { x: 500, y: 400 }
|
||||
expect(nextOpenBoardPosition([], preferred, { width: 280 })).toEqual(preferred)
|
||||
expect(nextOpenBoardPosition([{ x: 500, y: 400, width: 280 }], preferred, { width: 280 })).toEqual({ x: 826, y: 400 })
|
||||
expect(nextOpenBoardPosition([
|
||||
{ x: 500, y: 400, width: 280 },
|
||||
{ x: 826, y: 400, width: 280 },
|
||||
], preferred, { width: 280 })).toEqual({ x: 174, y: 400 })
|
||||
})
|
||||
})
|
||||
|
||||
describe('timeline projection', () => {
|
||||
|
||||
Reference in New Issue
Block a user