Bake Size slider zoom into saved SVG via viewBox crop

Fixkamo-internal
Змішані
11 березня 2026 р. о 21:03 UTC
Авторизація
kamo
Про нас
334fbe5

Avatar Creator's internal scale transform zooms the avatar body within the SVG canvas, but the effect is imperceptible at small display sizes (e.g. a 140x140 Avatar component). The preview was using a redundant CSS transform: scale() to show the zoom, but that CSS is never part of the saved SVG, so preview and saved always looked different. New approach: - Remove scale from avatarOptions (no Avatar Creator internal scale transform) - Add applyViewBoxZoom() which shrinks the SVG viewBox to the centre crop equivalent to CSS transform:scale(N) with overflow:hidden — this is visible at any display size and survives being saved to MinIO - Apply applyViewBoxZoom in generateAvatar so the preview SVG already reflects the correct zoom without any CSS transform - Update addBackgroundToSvg to read all four viewBox values (x, y, w, h) so the background rect is correctly positioned after a viewBox crop

Всі зміни

Як ви бачите відправлення?

Кожен з цих оновлень землі в робочому просторі автоматично. Почати вільний час і дивитися його на тиждень після тижня.

БезкоштовноПерегляд цін