v2.0.1: el dibujo del flujo con el acabado «cintura» (degradados, barras finas, nudo fino)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5npnUYgSPkAaHkdaeUqBr
This commit is contained in:
+8
-5
@@ -201,12 +201,15 @@
|
||||
}
|
||||
|
||||
// ── Geometría ───────────────────────────────────────────────────────
|
||||
const LH = movil ? 12 : 13, GAP = movil ? 8 : 6, ARRIBA = 22, ABAJO = 6;
|
||||
// v2.0.0 (opción «cintura», elegida por Aitor el 26-oct): barras finas y
|
||||
// redondeadas, un nudo que es solo una raya, y más aire entre filas.
|
||||
const LH = movil ? 12 : 13, GAP = movil ? 10 : 10, ARRIBA = 22, ABAJO = 6;
|
||||
const anchoEtiq = movil ? Math.round(ancho * 0.34) : Math.min(330, Math.round(ancho * 0.37));
|
||||
const maxCar = Math.max(10, Math.floor(anchoEtiq / (movil ? 6.0 : 6.1)));
|
||||
const barW = movil ? 7 : 10, nudoW = movil ? 8 : 12;
|
||||
const barW = movil ? 4 : 6, nudoW = 2;
|
||||
const xIn = anchoEtiq + 6, xOut = ancho - anchoEtiq - 6 - barW;
|
||||
const xNudo = Math.round(ancho / 2 - nudoW / 2);
|
||||
// El nudo, más cerca de las entradas: así las salidas tienen curvas largas.
|
||||
const xNudo = Math.round(xIn + barW + (xOut - xIn - barW) * 0.36);
|
||||
const derecha = [...salidas, ...(comision ? [comision] : [])];
|
||||
const filasMax = Math.max(entradas.length, derecha.length);
|
||||
const presupuesto = Math.max(movil ? 70 : 80, Math.min(movil ? 200 : 240, filasMax * (movil ? 18 : 22)));
|
||||
@@ -216,8 +219,8 @@
|
||||
const alto = v => v > 0 ? Math.max(altoMin, v * escala) : altoMin;
|
||||
|
||||
const piezasDe = f => {
|
||||
const p = [{ t: f.nombre, tono: "t1", negrita: true }];
|
||||
if (f.importe) p.push({ t: f.importe, tono: "t1" });
|
||||
// El importe primero y destacado; el nombre de la fila, discreto.
|
||||
const p = f.importe && !f.grupo && !f.coinbase ? [{ t: f.importe, tono: "t1", negrita: true }, { t: f.nombre, tono: "t2" }] : [{ t: f.nombre, tono: "t1", negrita: true }, ...(f.importe ? [{ t: f.importe, tono: "t1" }] : [])];
|
||||
if (f.dirTxt) p.push({ t: f.dirTxt, tono: "t2", letra: f.letra });
|
||||
if (f.extra) p.push({ t: f.extra, tono: "t2" });
|
||||
f.marcas.forEach((m, k) => p.push({ t: movil ? m.corto : m.texto, tono: m.tono, marca: true, salto: k === 0 }));
|
||||
|
||||
Reference in New Issue
Block a user