From 4714bac31a9a84bd8062ffd8c0d222660ae9e19d Mon Sep 17 00:00:00 2001 From: josedario87 Date: Wed, 26 Nov 2025 19:41:39 -0600 Subject: [PATCH] fix: Corregir centrado de texto con transform en preview MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Eliminar transform-origin: top left de font-b rules - Agregar transform-origin: center para líneas centradas con transforms - Soluciona alineación incorrecta en templates como Nota de Comercio --- app/components/preview/PaperSimulator.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/components/preview/PaperSimulator.vue b/app/components/preview/PaperSimulator.vue index c1ad2e8..2701668 100644 --- a/app/components/preview/PaperSimulator.vue +++ b/app/components/preview/PaperSimulator.vue @@ -149,13 +149,21 @@ function handleVariableClick(segment: TextSegment) { /* Font B con doble alto */ .line-content.font-b.text-double-height { transform: scaleX(0.825) scaleY(2); - transform-origin: top left; } /* Font B con doble ancho Y alto */ .line-content.font-b.text-double-width.text-double-height { transform: scale(1.65, 2); - transform-origin: top left; +} + +/* Transform origin para líneas centradas - permite que scale funcione correctamente con flexbox center */ +.align-center .line-content.font-b.text-double-width, +.align-center .line-content.font-b.text-double-height, +.align-center .line-content.font-b.text-double-width.text-double-height, +.align-center .line-content.text-double-width, +.align-center .line-content.text-double-height, +.align-center .line-content.text-double-width.text-double-height { + transform-origin: center; } /* Línea vacía (feed) */