mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-17 16:46:31 +03:00
Carry native comp capture and completion integrity fixes into the reviewed component workflow. Bump the skill to 4.4.0 and engine/platform pins to 0.1.6; keep publication separate from this release candidate. AI assistance: implemented and validated with OpenAI Codex.
6 lines
394 B
TypeScript
6 lines
394 B
TypeScript
/** Both panes use comp pixels and the same scale; source-image resolution is separate. */
|
|
export function comparisonSize(width: number, height: number, availableWidth: number, availableHeight: number, zoom: 'fit' | number) {
|
|
const scale = zoom === 'fit' ? Math.min(availableWidth / width, availableHeight / height) : zoom;
|
|
return { scale, width: width * scale, height: height * scale };
|
|
}
|