feat(web): wasm justified layout (#19150)

* wasm justified layout

* fix tests

* redundant layout generation

* raw position
This commit is contained in:
Mert 2025-06-17 10:20:14 -04:00 committed by GitHub
parent 8038ae1e7a
commit bc062da11b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 106 additions and 145 deletions

View file

@ -1,7 +1,7 @@
import { AssetOrder } from '@immich/sdk';
import type { CommonLayoutOptions } from '$lib/utils/layout-utils';
import { getJustifiedLayoutFromAssets, getPosition } from '$lib/utils/layout-utils';
import { getJustifiedLayoutFromAssets } from '$lib/utils/layout-utils';
import { plainDateTimeCompare } from '$lib/utils/timeline-util';
import type { MonthGroup } from './month-group.svelte';
@ -153,8 +153,7 @@ export class DayGroup {
this.width = geometry.containerWidth;
this.height = assets.length === 0 ? 0 : geometry.containerHeight;
for (let i = 0; i < this.viewerAssets.length; i++) {
const position = getPosition(geometry, i);
this.viewerAssets[i].position = position;
this.viewerAssets[i].position = geometry.getPosition(i);
}
}